Merge branch 'master' into upstream-merge-26965

This commit is contained in:
LetterJay
2017-06-19 15:39:01 -05:00
committed by GitHub
423 changed files with 304918 additions and 166801 deletions
+5 -3
View File
@@ -58,7 +58,7 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
//clockcult power defines
#define MIN_CLOCKCULT_POWER 25 //the minimum amount of power clockcult machines will handle gracefully
#define CLOCKCULT_POWER_UNIT (MIN_CLOCKCULT_POWER*100) //standard power amount for clockwork proselytizer costs
#define CLOCKCULT_POWER_UNIT (MIN_CLOCKCULT_POWER*100) //standard power amount for replica fabricator costs
#define POWER_STANDARD (CLOCKCULT_POWER_UNIT*0.2) //how much power is in anything else; doesn't matter as much as the following
@@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
#define POWER_PLASTEEL (CLOCKCULT_POWER_UNIT*0.05) //how much power is in one sheet of plasteel
#define RATVAR_POWER_CHECK "ratvar?" //when passed into can_use_power(), converts it into a check for if ratvar has woken/the proselytizer is debug
#define RATVAR_POWER_CHECK "ratvar?" //when passed into can_use_power(), converts it into a check for if ratvar has woken/the fabricator is debug
//Ark defines
#define GATEWAY_SUMMON_RATE 1 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 1 per tick
@@ -99,8 +99,10 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
#define SIGIL_ACCESS_RANGE 2 //range at which transmission sigils can access power
#define PROSELYTIZER_REPAIR_PER_TICK 4 //how much a proselytizer repairs each tick, and also how many deciseconds each tick is
#define FABRICATOR_REPAIR_PER_TICK 4 //how much a fabricator repairs each tick, and also how many deciseconds each tick is
#define OCULAR_WARDEN_EXCLUSION_RANGE 3 //the range at which ocular wardens cannot be placed near other ocular wardens
#define RATVARIAN_SPEAR_DURATION 1800 //how long ratvarian spears last; defaults to 3 minutes
#define PRISM_DELAY_DURATION 1200 //how long prolonging prisms delay the shuttle for; defaults to 2 minutes
+5 -1
View File
@@ -15,9 +15,13 @@
#define ABOVE_NORMAL_TURF_LAYER 2.08
#define LATTICE_LAYER 2.2
#define DISPOSAL_PIPE_LAYER 2.3
#define GAS_PIPE_LAYER 2.35
#define GAS_PIPE_HIDDEN_LAYER 2.35
#define WIRE_LAYER 2.4
#define WIRE_TERMINAL_LAYER 2.45
#define GAS_SCRUBBER_LAYER 2.46
#define GAS_PIPE_VISIBLE_LAYER 2.47
#define GAS_FILTER_LAYER 2.48
#define GAS_PUMP_LAYER 2.49
#define LOW_OBJ_LAYER 2.5
#define LOW_SIGIL_LAYER 2.52
#define SIGIL_LAYER 2.54
+7 -1
View File
@@ -429,4 +429,10 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define GIBTONITE_UNSTRUCK 0
#define GIBTONITE_ACTIVE 1
#define GIBTONITE_STABLE 2
#define GIBTONITE_DETONATE 3
#define GIBTONITE_DETONATE 3
//for obj explosion block calculation
#define EXPLOSION_BLOCK_PROC -1
//Gangster starting influences
#define GANGSTER_SOLDIER_STARTING_INFLUENCE 5
#define GANGSTER_BOSS_STARTING_INFLUENCE 20
+1
View File
@@ -11,6 +11,7 @@
#define SERVICE_CMD_HARD_REBOOT "hard_reboot"
#define SERVICE_CMD_GRACEFUL_SHUTDOWN "graceful_shutdown"
#define SERVICE_CMD_WORLD_ANNOUNCE "world_announce"
#define SERVICE_CMD_IRC_CHECK "irc_check"
#define SERVICE_CMD_IRC_STATUS "irc_status"
#define SERVICE_CMD_ADMIN_MSG "adminmsg"
#define SERVICE_CMD_NAME_CHECK "namecheck"
+2
View File
@@ -49,3 +49,5 @@
#define STATUS_EFFECT_SIGILMARK /datum/status_effect/sigil_mark
#define STATUS_EFFECT_CRUSHERDAMAGETRACKING /datum/status_effect/crusher_damage //tracks total kinetic crusher damage on a target
#define STATUS_EFFECT_SYPHONMARK /datum/status_effect/syphon_mark //tracks kills for the KA death syphon module
+1 -2
View File
@@ -451,13 +451,12 @@
//Picks from the list, with some safeties, and returns the "default" arg if it fails
#define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default)
#define LAZYINITLIST(L) if (!L) L = list()
#define UNSETEMPTY(L) if (L && !L.len) L = null
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
+3
View File
@@ -1,3 +1,6 @@
//wrapper macro for sending images that makes grepping easy
#define SEND_IMAGE(target, image) target << image
/proc/random_blood_type()
return pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
+2 -1
View File
@@ -14,4 +14,5 @@ GLOBAL_VAR_INIT(cult_vote_called, FALSE)
GLOBAL_VAR_INIT(cult_mastered, FALSE)
GLOBAL_VAR_INIT(reckoning_complete, FALSE)
GLOBAL_VAR_INIT(sac_complete, FALSE)
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
GLOBAL_LIST_EMPTY(summon_spots)
+2 -2
View File
@@ -43,11 +43,11 @@ GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_
//Backpacks
#define GBACKPACK "Grey Backpack"
#define GSATCHEL "Grey Satchel"
#define GDUFFLEBAG "Grey Dufflebag"
#define GDUFFLEBAG "Grey Dufflebag"
#define LSATCHEL "Leather Satchel"
#define DBACKPACK "Department Backpack"
#define DSATCHEL "Department Satchel"
#define DDUFFLEBAG "Department Dufflebag"
#define DDUFFLEBAG "Department Dufflebag"
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFLEBAG, GBACKPACK, GSATCHEL, GDUFFLEBAG, LSATCHEL))
//Uplink spawn loc
+1
View File
@@ -0,0 +1 @@
GLOBAL_LIST_EMPTY(commendations)
+1 -1
View File
@@ -13,4 +13,4 @@ GLOBAL_REAL_VAR(sqlport) = "3306"
GLOBAL_REAL_VAR(sqlfdbkdb) = "test"
GLOBAL_REAL_VAR(sqlfdbklogin) = "root"
GLOBAL_REAL_VAR(sqlfdbkpass) = ""
GLOBAL_REAL_VAR(sqlfdbktableprefix) = "erro_"
GLOBAL_REAL_VAR(sqlfdbktableprefix) = ""
+48 -1
View File
@@ -1,5 +1,10 @@
/client
var/list/atom/selected_target[2]
var/obj/item/active_mousedown_item = null
var/mouseParams = ""
var/mouseLocation = null
var/mouseObject = null
var/mouseControlObject = null
/client/MouseDown(object, location, control, params)
var/delay = mob.CanMobAutoclick(object, location, params)
@@ -9,14 +14,26 @@
while(selected_target[1])
Click(selected_target[1], location, control, selected_target[2])
sleep(delay)
active_mousedown_item = mob.canMobMousedown(object, location, params)
if(active_mousedown_item)
active_mousedown_item.onMouseDown(object, location, params, mob)
/client/MouseUp(object, location, control, params)
selected_target[1] = null
if(active_mousedown_item)
active_mousedown_item.onMouseUp(object, location, params, mob)
active_mousedown_item = null
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
mouseParams = params
mouseLocation = over_location
mouseObject = over_object
mouseControlObject = over_control
if(selected_target[1] && over_object && over_object.IsAutoclickable())
selected_target[1] = over_object
selected_target[2] = params
if(active_mousedown_item)
active_mousedown_item.onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
/mob/proc/CanMobAutoclick(object, location, params)
@@ -27,8 +44,31 @@
if(h)
. = h.CanItemAutoclick(object, location, params)
/mob/proc/canMobMousedown(object, location, params)
/mob/living/carbon/canMobMousedown(atom/object, location, params)
var/obj/item/H = get_active_held_item()
if(H)
. = H.canItemMouseDown(object, location, params)
/obj/item/proc/CanItemAutoclick(object, location, params)
/obj/item/proc/canItemMouseDown(object, location, params)
if(canMouseDown)
return src
/obj/item/proc/onMouseDown(object, location, params, mob)
return
/obj/item/proc/onMouseUp(object, location, params, mob)
return
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
return
/obj/item
var/canMouseDown = FALSE
/obj/item/weapon/gun
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
@@ -42,4 +82,11 @@
. = 0
/obj/screen/click_catcher/IsAutoclickable()
. = 1
. = 1
//Please don't roast me too hard
/client/MouseMove(object,location,control,params)
mouseParams = params
mouseLocation = location
mouseObject = object
mouseControlObject = control
+8 -10
View File
@@ -306,7 +306,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
angle = 0
cut_overlays()
icon_state = "runed_sense1"
desc = "The sacrifice is complete, bring the wrath of Nar-Sie upon the crew!"
desc = "The sacrifice is complete, summon Nar-Sie! The summoning can only take place in [english_list(GLOB.summon_spots)]!"
add_overlay(narnar)
return
var/turf/P = get_turf(blood_target)
@@ -361,7 +361,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
name = "Next Tier Requirements"
desc = "You shouldn't be seeing this description unless you're very fast. If you're very fast, good job!"
icon_state = "no-servants-caches"
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
/obj/screen/alert/clockwork/scripture_reqs/Initialize()
. = ..()
@@ -374,12 +374,11 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
/obj/screen/alert/clockwork/scripture_reqs/process()
if(GLOB.clockwork_gateway_activated)
qdel(src)
mob_viewer.clear_alert("scripturereq")
return
var/current_state
scripture_states = scripture_unlock_check()
for(var/i in scripture_states)
if(!scripture_states[i])
for(var/i in SSticker.scripture_states)
if(!SSticker.scripture_states[i])
current_state = i
break
icon_state = "no"
@@ -459,7 +458,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/servants = 0
var/validservants = 0
var/unconverted_ais_exist = get_unconverted_ais()
var/list/scripture_states = scripture_unlock_check()
var/list/textlist
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L))
@@ -496,7 +494,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
else
textlist += "<b>An unconverted AI exists!</b><br>"
if(scripture_states[SCRIPTURE_REVENANT])
if(SSticker.scripture_states[SCRIPTURE_REVENANT])
var/inathneq_available = GLOB.clockwork_generals_invoked["inath-neq"] <= world.time
var/sevtug_available = GLOB.clockwork_generals_invoked["sevtug"] <= world.time
var/nezbere_available = GLOB.clockwork_generals_invoked["nezbere"] <= world.time
@@ -508,9 +506,9 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist += "Generals available: <b>NONE</b><br>"
else
textlist += "Generals available: <b>NONE</b><br>"
for(var/i in scripture_states)
for(var/i in SSticker.scripture_states)
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
textlist += "[i] Scripture: <b>[scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
textlist += "[i] Scripture: <b>[SSticker.scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
desc = textlist.Join()
..()
Regular → Executable
+6
View File
@@ -21,6 +21,7 @@
C.parallax_layers_cached = list()
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -278,6 +279,11 @@
speed = 1
layer = 2
/obj/screen/parallax_layer/layer_3
icon_state = "layer3"
speed = 1.4
layer = 3
#undef LOOP_NONE
#undef LOOP_NORMAL
#undef LOOP_REVERSE
+1
View File
@@ -19,6 +19,7 @@
/obj/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/lighting
+435 -111
View File
@@ -175,6 +175,10 @@
cleanspeed = 80
var/emagged = 0
/obj/item/weapon/soap/tongue/New()
..()
flags |= NOBLUDGEON //No more attack messages
/obj/item/trash/rkibble
name = "robo kibble"
desc = "A novelty bowl of assorted mech fabricator byproducts. Mockingly feed this to the sec-dog to help it recharge."
@@ -301,145 +305,179 @@
//Sleeper
/obj/item/weapon/dogborg/sleeper
name = "mounted sleeper"
/obj/item/device/dogborg/sleeper
name = "Medbelly"
desc = "Equipment for medical hound. A mounted sleeper that stabilizes patients and can inject reagents in the borg's reserves."
icon = 'icons/mob/dogborg.dmi'
icon_state = "sleeper"
w_class = WEIGHT_CLASS_TINY
var/mob/living/carbon/patient = null
var/mob/living/silicon/hound = null
var/mob/living/silicon/robot/hound = null
var/inject_amount = 10
var/min_health = -100
var/occupied = 0
var/list/injection_chems = list("morphine", "salbutamol", "bicaridine", "kelotane","antitoxin")
var/cleaning = 0
var/patient_laststat = null
var/mob_energy = 30000 //Energy gained from digesting mobs (including PCs)
var/list/injection_chems = list("epinephrine", "morphine", "salbutamol", "bicaridine", "kelotane"),
var/eject_port = "ingestion"
var/list/items_preserved = list()
var/list/important_items = list(
/obj/item/weapon/hand_tele,
/obj/item/weapon/card/id/captains_spare,
/obj/item/device/aicard,
/obj/item/device/paicard,
/obj/item/weapon/gun,
/obj/item/weapon/pinpointer,
/obj/item/clothing/shoes/magboots,
/obj/item/clothing/head/helmet/space,
/obj/item/weapon/disk/nuclear)
/obj/item/weapon/dogborg/sleeper/Exit(atom/movable/O)
/obj/item/device/dogborg/sleeper/New()
..()
flags |= NOBLUDGEON //No more attack messages
/obj/item/device/dogborg/sleeper/Exit(atom/movable/O)
return 0
/obj/item/weapon/dogborg/sleeper/attack(mob/M, mob/living/silicon/robot/user)
..()
user.do_attack_animation(M, ATTACK_EFFECT_BITE)
/obj/item/weapon/dogborg/sleeper/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
/obj/item/device/dogborg/sleeper/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
hound = loc
if(!proximity)
return
if(!ishuman(target))
return
if(!patient_insertion_check(target))
return
user.visible_message("<span class='warning'>[user] starts putting [target] into \the [src].</span>", "<span class='notice'>You start putting [target] into [src]...</span>")
if(do_after(user, 50, target = target))
if(!patient_insertion_check(target))
return
target.forceMove(src)
playsound(user.loc, 'sound/vore/gulpold.ogg', 50, 1)
patient = target
hound = user
target.reset_perspective(src)
user << "<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>"
user.visible_message("<span class='warning'>[user] loads [target] into [src].</span>")
user.visible_message("[target] loaded. Life support functions engaged.")
src.occupied = 1
var/mob/living/silicon/robot.R = user
if(patient.stat < 2)
R.sleeper_r = 0
R.sleeper_g = 1
R.update_icons()
else
R.sleeper_g = 0
R.sleeper_r = 1
R.update_icons()
SSobj.processing |= src
/obj/item/weapon/dogborg/sleeper/proc/patient_insertion_check(mob/living/carbon/target, mob/user)
if(target.anchored)
user << "<span class='warning'>[target] will not fit into the sleeper because they are buckled to [target.buckled]!</span>"
if(target.buckled)
user << "<span class='warning'>The user is buckled and can not be put into your [src.name].</span>"
return
if(patient)
user << "<span class='warning'>The sleeper is already occupied!</span>"
user << "<span class='warning'>Your [src.name] is already occupied.</span>"
return
return 1
user.visible_message("<span class='warning'>[hound.name] is ingesting [target.name] into their [src.name].</span>", "<span class='notice'>You start ingesting [target] into your [src]...</span>")
if(!patient && ishuman(target) && !target.buckled && do_after (user, 50, target))
/obj/item/weapon/dogborg/sleeper/proc/go_out()
if(src.occupied == 0)
return
var/mob/living/silicon/robot.R = hound
hound << "<span class='notice'>[patient] ejected. Life support functions disabled.</span>"
R.sleeper_r = 0
R.sleeper_g = 0
R.update_icons()
patient.forceMove(get_turf(src))
patient.reset_perspective()
patient = null
src.occupied = 0
src.occupied = 0 //double check just in case
if(!proximity) return //If they moved away, you can't eat them.
/obj/item/weapon/dogborg/sleeper/proc/drain()
var/mob/living/silicon/robot.R = hound
R.cell.charge = R.cell.charge - 10
if(patient) return //If you try to eat two people at once, you can only eat one.
/obj/item/weapon/dogborg/sleeper/attack_self(mob/user)
else //If you don't have someone in you, proceed.
target.forceMove(src)
target.reset_perspective(src)
update_patient()
START_PROCESSING(SSobj, src)
user.visible_message("<span class='warning'>[hound.name]'s medical pod lights up as [target.name] slips inside into their [src.name].</span>", "<span class='notice'>Your medical pod lights up as [target] slips into your [src]. Life support functions engaged.</span>")
message_admins("[key_name(hound)] has eaten [key_name(patient)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
playsound(hound, 'sound/vore/gulpold.ogg', 100, 1)
/obj/item/device/dogborg/sleeper/proc/go_out(var/target)
hound = src.loc
if(length(contents) > 0)
hound.visible_message("<span class='warning'>[hound.name] empties out their contents via their [eject_port] port.</span>", "<span class='notice'>You empty your contents via your [eject_port] port.</span>")
if(target)
if(ishuman(target))
var/mob/living/carbon/human/person = target
person.forceMove(get_turf(src))
person.reset_perspective()
else
var/obj/T = target
T.loc = hound.loc
else
for(var/C in contents)
if(ishuman(C))
var/mob/living/carbon/human/person = C
person.forceMove(get_turf(src))
person.reset_perspective()
else
var/obj/T = C
T.loc = hound.loc
items_preserved.Cut()
cleaning = 0
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
update_patient()
else //You clicked eject with nothing in you, let's just reset stuff to be sure.
items_preserved.Cut()
cleaning = 0
update_patient()
/obj/item/device/dogborg/sleeper/proc/drain(var/amt = 3) //Slightly reduced cost (before, it was always injecting inaprov)
hound.cell.charge = hound.cell.charge - amt
/obj/item/device/dogborg/sleeper/attack_self(mob/user)
if(..())
return
sleeperUI(user)
/obj/item/weapon/dogborg/sleeper/proc/sleeperUI(mob/user)
/obj/item/device/dogborg/sleeper/proc/sleeperUI(mob/user)
var/dat
dat += "<h3>Injector</h3>"
if(patient)
if(patient && !(patient.stat & DEAD))
dat += "<A href='?src=\ref[src];inject=epinephrine'>Inject Epinephrine</A>"
else
dat += "<span class='linkOff'>Inject Epinephrine</span>"
if(patient && patient.health > min_health)
for(var/chem in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[chem]
for(var/re in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[re]
if(C)
dat += "<BR><A href='?src=\ref[src];inject=[C.id]'>Inject [C.name]</A>"
else
for(var/chem in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[chem]
for(var/re in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[re]
if(C)
dat += "<BR><span class='linkOff'>Inject [C.name]</span>"
dat += "<h3>Sleeper Status</h3>"
dat += "<A href='?src=\ref[src];refresh=1'>Scan</A>"
dat += "<A href='?src=\ref[src];eject=1'>Eject</A>"
dat += "<A id='refbutton' href='?src=\ref[src];refresh=1'>Refresh</A>"
dat += "<A href='?src=\ref[src];eject=1'>Eject All</A>"
dat += "<A href='?src=\ref[src];port=1'>Eject port: [eject_port]</A>"
if(!cleaning)
dat += "<A href='?src=\ref[src];clean=1'>Self-Clean</A>"
else
dat += "<span class='linkOff'>Self-Clean</span>"
dat += "<div class='statusDisplay'>"
//Cleaning and there are still un-preserved items
if(cleaning && length(contents - items_preserved))
dat += "<font color='red'><B>Self-cleaning mode.</B> [length(contents - items_preserved)] object(s) remaining.</font><BR>"
//There are no items to be processed other than un-preserved items
else if(cleaning && length(items_preserved))
dat += "<font color='red'><B>Self-cleaning done. Eject remaining objects now.</B></font><BR>"
//Preserved items count when the list is populated
if(length(items_preserved))
dat += "<font color='red'>[length(items_preserved)] uncleanable object(s).</font><BR>"
if(!patient)
dat += "Sleeper Unoccupied"
else
dat += "[patient.name] => "
switch(patient.stat) //obvious, see what their status is
switch(patient.stat)
if(0)
dat += "<span class='good'>Conscious</span>"
var/mob/living/silicon/robot.R = user
R.sleeper_r = 0
R.sleeper_g = 1
R.update_icons()
if(1)
dat += "<span class='average'>Unconscious</span>"
var/mob/living/silicon/robot.R = user
R.sleeper_r = 0
R.sleeper_g = 1
R.update_icons()
else
dat += "<span class='bad'>DEAD</span>"
var/mob/living/silicon/robot.R = user
R.sleeper_g = 0
R.sleeper_r = 1
R.update_icons()
dat += "<br />"
dat += "<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [patient.health < 0 ? "0" : "[patient.health]"]%;' class='progressFill good'></div></div><div class='statusValue'>[patient.stat > 1 ? "" : "[patient.health]%"]</div></div>"
dat += "<div class='line'><div class='statusLabel'>\> Brute Damage:</div><div class='progressBar'><div style='width: [patient.getBruteLoss()]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getBruteLoss()]%</div></div>"
dat += "<div class='line'><div class='statusLabel'>\> Resp. Damage:</div><div class='progressBar'><div style='width: [patient.getOxyLoss()]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getOxyLoss()]%</div></div>"
dat += "<div class='line'><div class='statusLabel'>\> Toxin Content:</div><div class='progressBar'><div style='width: [patient.getToxLoss()]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getToxLoss()]%</div></div>"
dat += "<div class='line'><div class='statusLabel'>\> Burn Severity:</div><div class='progressBar'><div style='width: [patient.getFireLoss()]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getFireLoss()]%</div></div><br>"
dat += "<HR><div class='line'><div style='width: 170px;' class='statusLabel'>Paralysis Summary:</div><div class='statusValue'>[round(patient.paralysis)]% [patient.paralysis ? "([round(patient.paralysis / 4)] seconds left)" : ""]</div></div><br>"
if(patient.getCloneLoss())
dat += "<div class='line'><span class='average'>Subject appears to have cellular damage.</span></div><br>"
var/healthcolor = (patient.health > 0 ? "color:white;" : "color:red;")
var/brutecolor = (patient.getBruteLoss() < 60 ? "color:gray;" : "color:red;")
var/o2color = (patient.getOxyLoss() < 60 ? "color:gray;" : "color:red;")
var/toxcolor = (patient.getToxLoss() < 60 ? "color:gray;" : "color:red;")
var/burncolor = (patient.getFireLoss() < 60 ? "color:gray;" : "color:red;")
dat += "<span style='[healthcolor]'>\t-Overall Health %: [round(patient.health)]</span><BR>"
dat += "<span style='[brutecolor]'>\t-Brute Damage %: [patient.getBruteLoss()]</span><BR>"
dat += "<span style='[o2color]'>\t-Respiratory Damage %: [patient.getOxyLoss()]</span><BR>"
dat += "<span style='[toxcolor]'>\t-Toxin Content %: [patient.getToxLoss()]</span><BR>"
dat += "<span style='[burncolor]'>\t-Burn Severity %: [patient.getFireLoss()]</span><BR>"
if(round(patient.paralysis / 4) >= 1)
dat += text("<HR>Patient paralyzed for: []<BR>", round(patient.paralysis / 4) >= 1 ? "[round(patient.paralysis / 4)] seconds" : "None")
if(patient.getBrainLoss())
dat += "<div class='line'><span class='average'>Significant brain damage detected.</span></div><br>"
if(patient.getCloneLoss())
dat += "<div class='line'><span class='average'>Patient may be improperly cloned.</span></div><br>"
if(patient.reagents.reagent_list.len)
for(var/datum/reagent/R in patient.reagents.reagent_list)
dat += "<div class='line'><div style='width: 170px;' class='statusLabel'>[R.name]:</div><div class='statusValue'>[round(R.volume, 0.1)] units</div></div><br>"
@@ -451,11 +489,13 @@
popup.open()
return
/obj/item/weapon/dogborg/sleeper/Topic(href, href_list)
/obj/item/device/dogborg/sleeper/Topic(href, href_list)
if(..() || usr == patient)
return
usr.set_machine(src)
if(href_list["refresh"])
update_patient()
src.updateUsrDialog()
sleeperUI(usr)
return
@@ -463,42 +503,322 @@
go_out()
sleeperUI(usr)
return
if(patient && patient.stat != DEAD)
if(href_list["clean"])
if(!cleaning)
var/confirm = alert(usr, "You are about to engage self-cleaning mode. This will fill your [src] with caustic enzymes to remove any objects or biomatter, and convert them into energy. Are you sure?", "Confirmation", "Self-Clean", "Cancel")
if(confirm == "Self-Clean")
if(cleaning)
return
else
cleaning = 1
drain(500)
START_PROCESSING(SSobj, src)
sleeperUI(usr)
if(patient)
patient << "<span class='danger'>[hound.name]'s [src.name] fills with caustic enzymes around you!</span>"
return
if(cleaning)
sleeperUI(usr)
return
if(href_list["port"])
switch(eject_port)
if("ingestion")
eject_port = "disposal"
if("disposal")
eject_port = "ingestion"
sleeperUI(usr)
return
if(patient && !(patient.stat & DEAD))
if(href_list["inject"] == "epinephrine" || patient.health > min_health)
inject_chem(usr, href_list["inject"])
else
usr << "<span class='notice'>ERROR: Subject is not in stable condition for auto-injection.</span>"
usr << "<span class='notice'>ERROR: Subject is not in stable condition for injections.</span>"
else
usr << "<span class='notice'>ERROR: Subject cannot metabolise chemicals.</span>"
src.updateUsrDialog()
sleeperUI(usr) //Needs a callback to boop the page to refresh.
return
/obj/item/weapon/dogborg/sleeper/proc/inject_chem(mob/user, chem)
/obj/item/device/dogborg/sleeper/proc/inject_chem(mob/user, chem)
if(patient && patient.reagents)
if(chem in injection_chems + "epinephrine")
if(patient.reagents.get_reagent_amount(chem) + 10 <= 20)
patient.reagents.add_reagent(chem, 10)
var/mob/living/silicon/robot.R = user
R.cell.charge = R.cell.charge - 250 //-250 charge per sting.
if(hound.cell.charge < 800) //This is so borgs don't kill themselves with it.
hound << "<span class='notice'>You don't have enough power to synthesize fluids.</span>"
return
else if(patient.reagents.get_reagent_amount(chem) + 10 >= 20) //Preventing people from accidentally killing themselves by trying to inject too many chemicals!
hound << "<span class='notice'>Your stomach is currently too full of fluids to secrete more fluids of this kind.</span>"
else if(patient.reagents.get_reagent_amount(chem) + 10 <= 20) //No overdoses for you
patient.reagents.add_reagent(chem, inject_amount)
drain(750) //-750 charge per injection
var/units = round(patient.reagents.get_reagent_amount(chem))
user << "<span class='notice'>Occupant now has [units] unit\s of [GLOB.chemical_reagents_list[chem]] in their bloodstream.</span>"
hound << "<span class='notice'>Injecting [units] unit\s of [injection_chems[chem]] into occupant.</span>" //If they were immersed, the reagents wouldn't leave with them.
/obj/item/weapon/dogborg/sleeper/process()
if(src.occupied == 0)
SSobj.processing.Remove(src)
/obj/item/device/dogborg/sleeper/process()
if(cleaning) //We're cleaning, return early after calling this as we don't care about the patient.
src.clean_cycle()
return
if(patient.health > 0)
patient.adjustOxyLoss(-1)
patient.updatehealth()
patient.AdjustStunned(-4)
patient.AdjustWeakened(-4)
src.drain()
if(patient.reagents.get_reagent_amount("epinephrine") < 5)
patient.reagents.add_reagent("epinephrine", 5)
/obj/item/weapon/dogborg/sleeper/container_resist()
go_out()
if(patient) //We're caring for the patient. Medical emergency! Or endo scene.
update_patient()
if(patient.health < 0)
patient.adjustOxyLoss(-1) //Heal some oxygen damage if they're in critical condition
patient.updatehealth()
patient.AdjustStunned(-4)
patient.AdjustWeakened(-4)
src.drain()
if((patient.reagents.get_reagent_amount("epinephrine") < 5) && (patient.health < patient.maxHealth)) //Stop pumping full HP people full of drugs. Don't heal people you're digesting, meanie.
patient.reagents.add_reagent("epinephrine", 5)
return
if(!patient && !cleaning) //We think we're done working.
if(!update_patient()) //One last try to find someone
STOP_PROCESSING(SSobj, src)
return
/obj/item/device/dogborg/sleeper/proc/update_patient()
//Well, we HAD one, what happened to them?
if(patient in contents)
if(patient_laststat != patient.stat)
if(patient.stat & DEAD)
hound.sleeper_r = 1
hound.sleeper_g = 0
patient_laststat = patient.stat
else
hound.sleeper_r = 0
hound.sleeper_g = 1
patient_laststat = patient.stat
//Update icon
hound.update_icons()
//Return original patient
return(patient)
//Check for a new patient
else
for(var/mob/living/carbon/human/C in contents)
patient = C
if(patient.stat & DEAD)
hound.sleeper_r = 1
hound.sleeper_g = 0
patient_laststat = patient.stat
else
hound.sleeper_r = 0
hound.sleeper_g = 1
patient_laststat = patient.stat
//Update icon and return new patient
hound.update_icons()
return(C)
//Cleaning looks better with red on, even with nobody in it
if(cleaning && !patient)
hound.sleeper_r = 1
hound.sleeper_g = 0
//Couldn't find anyone, and not cleaning
else if(!cleaning && !patient)
hound.sleeper_r = 0
hound.sleeper_g = 0
patient_laststat = null
patient = null
hound.update_icons()
return
//Gurgleborg process
/obj/item/device/dogborg/sleeper/proc/clean_cycle()
//Sanity? Maybe not required. More like if indigestible person OOC escapes.
for(var/I in items_preserved)
if(!(I in contents))
items_preserved -= I
var/list/touchable_items = contents - items_preserved
//Belly is entirely empty
if(!length(contents))
hound << "<span class='notice'>Your [src.name] is now clean. Ending self-cleaning cycle.</span>"
cleaning = 0
update_patient()
return
if(prob(20))
var/churnsound = pick(
'sound/vore/pred/digest_01.ogg',
'sound/vore/pred/digest_02.ogg',
'sound/vore/pred/digest_03.ogg',
'sound/vore/pred/digest_04.ogg',
'sound/vore/pred/digest_05.ogg',
'sound/vore/pred/digest_06.ogg',
'sound/vore/pred/digest_07.ogg',
'sound/vore/pred/digest_08.ogg',
'sound/vore/pred/digest_09.ogg',
'sound/vore/pred/digest_10.ogg',
'sound/vore/pred/digest_11.ogg',
'sound/vore/pred/digest_12.ogg',
'sound/vore/pred/digest_13.ogg',
'sound/vore/pred/digest_14.ogg',
'sound/vore/pred/digest_15.ogg',
'sound/vore/pred/digest_16.ogg',
'sound/vore/pred/digest_17.ogg',
'sound/vore/pred/digest_18.ogg')
for(var/mob/outhearer in range(1,hound))
outhearer << sound(churnsound)
for(var/mob/inhearer in contents)
inhearer << sound(churnsound)
//If the timing is right, and there are items to be touched
if(SSmobs.times_fired%6==1 && length(touchable_items))
//Burn all the mobs or add them to the exclusion list
for(var/mob/living/carbon/human/T in (touchable_items))
if((T.status_flags & GODMODE) || !T.digestable)
src.items_preserved += T
else
T.adjustBruteLoss(2)
T.adjustFireLoss(3)
src.update_patient()
//Pick a random item to deal with (if there are any)
var/atom/target = pick(touchable_items)
//Handle the target being a mob
if(ishuman(target))
var/mob/living/carbon/human/T = target
//Mob is now dead
if(T.stat & DEAD)
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
hound << "<span class='notice'>You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.</span>"
T << "<span class='notice'>You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.</span>"
src.drain(-30000) //Fueeeeellll
var/deathsound = pick(
'sound/vore/pred/death_01.ogg',
'sound/vore/pred/death_02.ogg',
'sound/vore/pred/death_03.ogg',
'sound/vore/pred/death_04.ogg',
'sound/vore/pred/death_05.ogg',
'sound/vore/pred/death_06.ogg',
'sound/vore/pred/death_07.ogg',
'sound/vore/pred/death_08.ogg',
'sound/vore/pred/death_09.ogg',
'sound/vore/pred/death_10.ogg',
'sound/vore/pred/death_11.ogg',
'sound/vore/pred/death_12.ogg',
'sound/vore/pred/death_13.ogg')
for(var/mob/hearer in range(1,src.hound))
hearer << deathsound
T << deathsound
qdel(T)
src.update_patient()
//Handle the target being anything but a /mob/living/carbon/human
else
var/obj/T = target
//If the object is in the items_preserved global list //POLARISTODO
if(T.type in important_items)
src.items_preserved += T
//If the object is not one to preserve
else
//Special case for PDAs as they are dumb. TODO fix Del on PDAs to be less dumb.
if (istype(T, /obj/item/device/pda))
var/obj/item/device/pda/PDA = T
if (PDA.id)
PDA.id.forceMove(src)
PDA.id = null
qdel(T)
//Special case for IDs to make them digested
//else if (istype(T, /obj/item/weapon/card/id))
//var/obj/item/weapon/card/id/ID = T
//ID.digest() //Need the digest proc, first.
//Anything not perserved, PDA, or ID
else
//Spill(T) //Needs the spill proc to be added
qdel(T)
src.update_patient()
src.hound.cell.charge += 120 //10 charge? that was such a practically nonexistent number it hardly gave any purpose for this bit :v *cranks up*
return
/obj/item/device/dogborg/sleeper/container_resist()
if(prob(8))
go_out()
/obj/item/device/dogborg/sleeper/K9 //The K9 portabrig
name = "Brig-Belly"
desc = "Equipment for a K9 unit. A mounted portable-brig that holds criminals."
icon = 'icons/mob/dogborg.dmi'
icon_state = "sleeperb"
inject_amount = 10
min_health = -100
injection_chems = null //So they don't have all the same chems as the medihound!
/obj/item/device/dogborg/sleeper/compactor //Janihound gut.
name = "garbage processor"
desc = "A mounted garbage compactor unit with fuel processor."
icon = 'icons/mob/dogborg.dmi'
icon_state = "compactor"
inject_amount = 10
min_health = -100
injection_chems = null //So they don't have all the same chems as the medihound!
var/max_item_count = 32
/obj/item/weapon/storage/attackby(obj/item/device/dogborg/sleeper/compactor, mob/user, proximity) //GIT CIRCUMVENTED YO!
compactor.afterattack(src, user ,1)
/obj/item/device/dogborg/sleeper/compactor/afterattack(var/atom/movable/target, mob/living/silicon/user, proximity)//GARBO NOMS
hound = loc
if(!istype(target))
return
if(!proximity)
return
if(target.anchored)
return
if(length(contents) > (max_item_count - 1))
user << "<span class='warning'>Your [src.name] is full. Eject or process contents to continue.</span>"
return
if(istype(target,/obj/item))
var/obj/item/target_obj = target
if(target_obj.w_class > WEIGHT_CLASS_BULKY)
user << "<span class='warning'>\The [target] is too large to fit into your [src.name]</span>"
return
user.visible_message("<span class='warning'>[hound.name] is ingesting [target.name] into their [src.name].</span>", "<span class='notice'>You start ingesting [target] into your [src.name]...</span>")
if(do_after(user, 30, target) && length(contents) < max_item_count)
target.forceMove(src)
user.visible_message("<span class='warning'>[hound.name]'s garbage processor groans lightly as [target.name] slips inside.</span>", "<span class='notice'>Your garbage compactor groans lightly as [target] slips inside.</span>")
playsound(hound, 'sound/vore/gulpold.ogg', 50, 1)
if(length(contents) > 11) //grow that tum after a certain junk amount
hound.sleeper_r = 1
hound.update_icons()
return
else if(ishuman(target))
var/mob/living/carbon/human/trashman = target
if(patient)
user << "<span class='warning'>Your [src.name] is already occupied.</span>"
return
if(trashman.buckled)
user << "<span class='warning'>[trashman] is buckled and can not be put into your [src.name].</span>"
return
user.visible_message("<span class='warning'>[hound.name] is ingesting [trashman] into their [src.name].</span>", "<span class='notice'>You start ingesting [trashman] into your [src.name]...</span>")
if(do_after(user, 30, trashman) && !patient && !trashman.buckled && length(contents) < max_item_count)
trashman.forceMove(src)
trashman.reset_perspective(src)
update_patient()
START_PROCESSING(SSobj, src)
user.visible_message("<span class='warning'>[hound.name]'s garbage processor groans lightly as [trashman] slips inside.</span>", "<span class='notice'>Your garbage compactor groans lightly as [trashman] slips inside.</span>")
playsound(hound, 'sound/vore/gulpold.ogg', 80, 1)
return
return
// Pounce stuff for K-9
@@ -510,6 +830,10 @@
force = 0
throwforce = 0
/obj/item/weapon/dogborg/pounce/New()
..()
flags |= NOBLUDGEON
/mob/living/silicon/robot
var/leaping = 0
var/pounce_cooldown = 0
+1 -1
View File
@@ -7,7 +7,7 @@
#define SSAIR_SUPERCONDUCTIVITY 7
SUBSYSTEM_DEF(air)
name = "Air"
name = "Atmospherics"
init_order = INIT_ORDER_AIR
priority = 20
wait = 5
+2 -2
View File
@@ -171,8 +171,8 @@ SUBSYSTEM_DEF(blackbox)
var/sqlfire = sanitizeSQL(L.getFireLoss())
var/sqlbrain = sanitizeSQL(L.getBrainLoss())
var/sqloxy = sanitizeSQL(L.getOxyLoss())
var/sqltox = sanitizeSQL(L.getStaminaLoss())
var/sqlclone = sanitizeSQL(L.getStaminaLoss())
var/sqltox = sanitizeSQL(L.getToxLoss())
var/sqlclone = sanitizeSQL(L.getCloneLoss())
var/sqlstamina = sanitizeSQL(L.getStaminaLoss())
var/coord = sanitizeSQL("[L.x], [L.y], [L.z]")
var/map = sanitizeSQL(SSmapping.config.map_name)
+1 -1
View File
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(dbcore)
//This is as close as we can get to the true round end before Disconnect() without changing where it's called, defeating the reason this is a subsystem
if(SSdbcore.Connect())
var/sql_station_name = sanitizeSQL(station_name())
var/datum/DBQuery/query_round_end = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (end_datetime, game_mode_result, end_state, station_name) VALUES (Now(), '[SSticker.mode_result]', '[SSticker.end_state]', '[sql_station_name]') WHERE id = [GLOB.round_id]")
var/datum/DBQuery/query_round_end = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET end_datetime = Now(), game_mode_result = '[SSticker.mode_result]', end_state = '[SSticker.end_state]', station_name = '[sql_station_name]' WHERE id = [GLOB.round_id]")
query_round_end.Execute()
if(IsConnected())
Disconnect()
@@ -161,7 +161,7 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
if(NOT_QUEUED_ALREADY && need_compile) //have we caught more pokemon?
QUEUE_FOR_COMPILE
/atom/proc/copy_overlays(atom/other, cut_old = FALSE) //copys our_overlays from another atom
/atom/proc/copy_overlays(atom/other, cut_old) //copys our_overlays from another atom
if(!other)
if(cut_old)
cut_overlays()
@@ -190,3 +190,18 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
/image/proc/cut_overlays(x)
overlays.Cut()
/image/proc/copy_overlays(atom/other, cut_old)
if(!other)
if(cut_old)
cut_overlays()
return
var/list/cached_other = other.our_overlays
if(cached_other)
if(cut_old || !overlays.len)
overlays = cached_other.Copy()
else
overlays |= cached_other
else if(cut_old)
cut_overlays()
@@ -22,9 +22,7 @@ SUBSYSTEM_DEF(processing)
while(current_run.len)
var/datum/thing = current_run[current_run.len]
current_run.len--
if(thing)
thing.process(wait)
else
if(QDELETED(thing) || thing.process(wait) == PROCESS_KILL)
processing -= thing
if (MC_TICK_CHECK)
return
@@ -33,4 +31,4 @@ SUBSYSTEM_DEF(processing)
/datum/proc/process()
set waitfor = 0
STOP_PROCESSING(SSobj, src)
return 0
return 0
+1 -1
View File
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(shuttle)
var/lockdown = FALSE //disallow transit after nuke goes off
var/auto_call = 72000 //time before in deciseconds in which the shuttle is auto called. Default is 2 hours.
var/auto_call = 99000 //time before in deciseconds in which the shuttle is auto called. Default is 2½ hours plus 15 for the shuttle. So total is 3.
/datum/controller/subsystem/shuttle/Initialize(timeofday)
if(!arrivals)
+6 -35
View File
@@ -581,45 +581,16 @@ SUBSYSTEM_DEF(ticker)
CHECK_TICK
//Borers
var/borerwin = FALSE
if(GLOB.borers.len)
var/borertext = "<br><font size=3><b>The borers were:</b></font>"
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
if((B.key || B.controlling) && B.stat != DEAD)
borertext += "<br>[B.controlling ? B.victim.key : B.key] was [B.truename] ("
var/turf/location = get_turf(B)
if(location.z == ZLEVEL_CENTCOM && B.victim)
borertext += "escaped with host"
else
borertext += "failed"
borertext += ")"
to_chat(world, borertext)
mode.declare_station_goal_completion()
var/total_borers = 0
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
if((B.key || B.victim) && B.stat != DEAD)
total_borers++
if(total_borers)
var/total_borer_hosts = 0
for(var/mob/living/carbon/C in GLOB.mob_list)
var/mob/living/simple_animal/borer/D = C.has_brain_worms()
var/turf/location = get_turf(C)
if(location.z == ZLEVEL_CENTCOM && D && D.stat != DEAD)
total_borer_hosts++
if(GLOB.total_borer_hosts_needed <= total_borer_hosts)
borerwin = TRUE
to_chat(world, "<b>There were [total_borers] borers alive at round end!</b>")
to_chat(world, "<b>A total of [total_borer_hosts] borers with hosts escaped on the shuttle alive. The borers needed [GLOB.total_borer_hosts_needed] hosts to escape.</b>")
if(borerwin)
to_chat(world, "<b><font color='green'>The borers were successful!</font></b>")
else
to_chat(world, "<b><font color='red'>The borers have failed!</font></b>")
//medals, placed far down so that people can actually see the commendations.
if(GLOB.commendations)
to_chat(world, "<b><font size=3>Medal Commendations:</font></b>")
for (var/com in GLOB.commendations)
to_chat(world, com)
CHECK_TICK
mode.declare_station_goal_completion()
CHECK_TICK
//Adds the del() log to world.log in a format condensable by the runtime condenser found in tools
+14 -2
View File
@@ -1,3 +1,5 @@
#define SUMMON_POSSIBILITIES 3
/datum/antagonist/cult
var/datum/action/innate/cult/comm/communion = new
var/datum/action/innate/cult/mastervote/vote = new
@@ -35,6 +37,11 @@
message_admins("Cult Sacrifice: Could not find unconvertable or convertable target. WELP!")
GLOB.sac_complete = TRUE
SSticker.mode.cult_objectives += "sacrifice"
if(!GLOB.summon_spots.len)
while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES)
var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots)
if(summon && (summon.z == ZLEVEL_STATION) && summon.valid_territory)
GLOB.summon_spots += summon
SSticker.mode.cult_objectives += "eldergod"
/datum/antagonist/cult/proc/cult_memorization(datum/mind/cult_mind)
@@ -47,8 +54,9 @@
explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role] via invoking a Sacrifice rune with them on it and three acolytes around it."
else
explanation = "The veil has already been weakened here, proceed to the final objective."
GLOB.sac_complete = TRUE
if("eldergod")
explanation = "Summon Nar-Sie by invoking the rune 'Summon Nar-Sie' with nine acolytes on it. You must do this after sacrificing your target."
explanation = "Summon Nar-Sie by invoking the rune 'Summon Nar-Sie'. <b>The summoning can only be accomplished in [english_list(GLOB.summon_spots)] - where the veil is weak enough for the ritual to begin.</b>"
if(!silent)
to_chat(current, "<B>Objective #[obj_count]</B>: [explanation]")
cult_mind.memory += "<B>Objective #[obj_count]</B>: [explanation]<BR>"
@@ -112,10 +120,12 @@
/datum/antagonist/cult/master
var/datum/action/innate/cult/master/finalreck/reckoning = new
var/datum/action/innate/cult/master/cultmark/bloodmark = new
var/datum/action/innate/cult/master/pulse/throwing = new
/datum/antagonist/cult/master/Destroy()
QDEL_NULL(reckoning)
QDEL_NULL(bloodmark)
QDEL_NULL(throwing)
return ..()
/datum/antagonist/cult/master/on_gain()
@@ -136,6 +146,7 @@
if(!GLOB.reckoning_complete)
reckoning.Grant(current)
bloodmark.Grant(current)
throwing.Grant(current)
current.update_action_buttons_icon()
current.apply_status_effect(/datum/status_effect/cult_master)
@@ -146,5 +157,6 @@
current = mob_override
reckoning.Remove(current)
bloodmark.Remove(current)
throwing.Remove(current)
current.update_action_buttons_icon()
current.remove_status_effect(/datum/status_effect/cult_master)
current.remove_status_effect(/datum/status_effect/cult_master)
+12 -5
View File
@@ -115,12 +115,19 @@
else
return
if(isturf(source.loc))
var/turf/T = source.loc
if(istype(T))
for(var/mob/living/carbon/C in oview(spread_range, source))
if(isturf(C.loc))
if(AStar(source, C.loc,/turf/proc/Distance, spread_range, adjacent = (spread_flags & AIRBORNE) ? /turf/proc/reachableAdjacentAtmosTurfs : /turf/proc/reachableAdjacentTurfs))
C.ContractDisease(src)
var/turf/V = get_turf(C)
if(V)
while(TRUE)
if(V == T)
C.ContractDisease(src)
break
var/turf/Temp = get_step_towards(V, T)
if(!CANATMOSPASS(V, Temp))
break
V = Temp
/datum/disease/process()
if(!holder)
@@ -42,7 +42,7 @@ Bonus
return
/datum/symptom/vomit/proc/Vomit(mob/living/carbon/M)
M.vomit(20)
M.vomit(20)
/*
//////////////////////////////////////
@@ -75,7 +75,7 @@ Bonus
severity = 5
/datum/symptom/vomit/blood/Vomit(mob/living/carbon/M)
M.vomit(0, 1)
M.vomit(0,TRUE)
/*
@@ -103,4 +103,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
M.vomit(6,0,1,5,1)
M.vomit(6, distance = 5)
+1 -1
View File
@@ -31,4 +31,4 @@
affected_mob.adjustToxLoss(1)
if(3)
if(prob(1))
affected_mob.vomit(95)
affected_mob.vomit(95)
+7 -22
View File
@@ -279,16 +279,9 @@ GLOBAL_LIST_EMPTY(explosions)
var/turf/T = affected_turfs[I]
var/current_exp_block = T.density ? T.explosion_block : 0
for(var/obj/machinery/door/D in T)
if(D.density)
current_exp_block += D.explosion_block
for(var/obj/structure/window/W in T)
if(W.reinf && W.fulltile)
current_exp_block += W.explosion_block
for(var/obj/structure/blob/B in T)
current_exp_block += B.explosion_block
for(var/obj/O in T)
var/the_block = O.explosion_block
current_exp_block += the_block == EXPLOSION_BLOCK_PROC ? O.GetExplosionBlock() : the_block
.[T] = current_exp_block
@@ -351,20 +344,12 @@ GLOBAL_LIST_EMPTY(explosions)
var/turf/TT = T
while(TT != epicenter)
TT = get_step_towards(TT,epicenter)
if(TT.density && TT.explosion_block)
if(TT.density)
dist += TT.explosion_block
for(var/obj/machinery/door/D in TT)
if(D.density && D.explosion_block)
dist += D.explosion_block
for(var/obj/structure/window/W in TT)
if(W.explosion_block && W.fulltile)
dist += W.explosion_block
for(var/obj/structure/blob/B in T)
dist += B.explosion_block
for(var/obj/O in T)
var/the_block = O.explosion_block
dist += the_block == EXPLOSION_BLOCK_PROC ? O.GetExplosionBlock() : the_block
if(dist < dev)
T.color = "red"
T.maptext = "Dev"
+3 -3
View File
@@ -73,13 +73,13 @@
return ""
. = header ? "The following pull requests are currently test merged:<br>" : ""
for(var/line in testmerge)
var/cm = testmerge[line]["commit"]
var/details
if(world.RunningService())
var/cm = testmerge[line]["commit"]
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["author"]) + " at commit " + html_encode(copytext(cm, 1, min(length(cm), 7)))
else if(has_pr_details) //tgs2 support
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["user"]["login"])
. += "<a href='[config.githuburl]/pull/[line]'>#[line][details]</a><br>"
. += "<a href=\"[config.githuburl]/pull/[line]\">#[line][details]</a><br>"
/client/verb/showrevinfo()
set category = "OOC"
@@ -93,7 +93,7 @@
to_chat(src, GLOB.revdata.GetTestMergeInfo())
prefix = "Based off origin/master commit: "
var/pc = GLOB.revdata.originmastercommit
to_chat(src, "[prefix]<a href='[config.githuburl]/commit/[pc]'>[copytext(pc, 1, min(length(pc), 7))]</a>")
to_chat(src, "[prefix]<a href=\"[config.githuburl]/commit/[pc]\">[copytext(pc, 1, min(length(pc), 7))]</a>")
else
to_chat(src, "Revision unknown")
to_chat(src, "<b>Current Infomational Settings:</b>")
+2 -2
View File
@@ -23,7 +23,7 @@
new_mob.key = key
The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
The Login proc will handle making a new mind for that mobtype (including setting up stuff like mind.name). Simple!
However if you want that mind to have any special properties like being a traitor etc you will have to do that
yourself.
@@ -989,7 +989,7 @@
if(!G || (src in G.bosses))
return
SSticker.mode.remove_gangster(src,0,2,1)
G.bosses += src
G.bosses[src] = GANGSTER_BOSS_STARTING_INFLUENCE
gang_datum = G
special_role = "[G.name] Gang Boss"
G.add_gang_hud(src)
+5
View File
@@ -408,6 +408,11 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/chameleon/on_move(mob/living/carbon/human/owner)
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
/datum/mutation/human/chameleon/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
if(proximity) //stops tk from breaking chameleon
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
return
/datum/mutation/human/chameleon/on_losing(mob/living/carbon/human/owner)
if(..())
return
Regular → Executable
+8
View File
@@ -22,6 +22,7 @@
var/internals_slot = null //ID of slot containing a gas tank
var/list/backpack_contents = null // In the list(path=count,otherpath=count) format
var/list/implants = null
var/accessory = null
var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters
@@ -64,6 +65,13 @@
if(suit_store)
H.equip_to_slot_or_del(new suit_store(H),slot_s_store)
if(accessory)
var/obj/item/clothing/under/U = H.w_uniform
if(U)
U.attach_accessory(new accessory(H))
else
WARNING("Unable to equip accessory [accessory] in outfit [name]. No uniform present!")
if(l_hand)
H.put_in_l_hand(new l_hand(H))
if(r_hand)
+7
View File
@@ -40,6 +40,8 @@
passindex++
var/mob/living/buckled_mob = m
var/list/offsets = get_offsets(passindex)
var/rider_dir = get_rider_dir(passindex)
buckled_mob.setDir(rider_dir)
dir_loop:
for(var/offsetdir in offsets)
if(offsetdir == ridden_dir)
@@ -56,6 +58,11 @@
/datum/riding/proc/get_offsets(pass_index) // list(dir = x, y, layer)
return list("[NORTH]" = list(0, 0), "[SOUTH]" = list(0, 0), "[EAST]" = list(0, 0), "[WEST]" = list(0, 0))
//Override this to set the passengers/riders dir based on which passenger they are.
//ie: rider facing the vehicle's dir, but passenger 2 facing backwards, etc.
/datum/riding/proc/get_rider_dir(pass_index)
return ridden.dir
//KEYS
/datum/riding/proc/keycheck(mob/user)
if(keytype)
+5 -4
View File
@@ -232,19 +232,20 @@
/datum/status_effect/cult_master
id = "The Cult Master"
duration = -1
tick_interval = 100
alert_type = null
on_remove_on_mob_delete = TRUE
var/alive = TRUE
/datum/status_effect/cult_master/proc/deathrattle()
if(!QDELETED(GLOB.cult_narsie))
return //if nar-sie is alive, don't even worry about it
var/area/A = get_area(owner)
for(var/datum/mind/B in SSticker.mode.cult)
if(isliving(B.current))
var/mob/living/M = B.current
M << 'sound/hallucinations/veryfar_noise.ogg'
to_chat(M, "<span class='cultlarge'>The Cult's Master, [owner], has fallen in the [A]!")
to_chat(M, "<span class='cultlarge'>The Cult's Master, [owner], has fallen in \the [A]!</span>")
/datum/status_effect/cult_master/tick()
if(owner.stat != DEAD && !alive)
alive = TRUE
+40
View File
@@ -16,3 +16,43 @@
status_type = STATUS_EFFECT_UNIQUE
alert_type = null
var/total_damage = 0
/datum/status_effect/syphon_mark/on_apply()
if(owner.stat == DEAD)
return FALSE
return ..()
/datum/status_effect/syphon_mark/proc/get_kill()
if(reward_target)
reward_target.get_kill(owner)
/datum/status_effect/syphon_mark/tick()
if(owner.stat == DEAD)
get_kill()
qdel(src)
/datum/status_effect/syphon_mark/on_remove()
get_kill()
. = ..()
/datum/status_effect/syphon_mark
id = "syphon_mark"
duration = 50
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
on_remove_on_mob_delete = TRUE
var/obj/item/borg/upgrade/modkit/bounty/reward_target
/datum/status_effect/syphon_mark/on_apply()
if(owner.stat == DEAD)
return FALSE
return ..()
/datum/status_effect/syphon_mark/tick()
if(owner.stat == DEAD)
get_kill()
qdel(src)
/datum/status_effect/syphon_mark/on_remove()
get_kill()
. = ..()
+101
View File
@@ -0,0 +1,101 @@
/datum/verbs
var/name
var/list/children
var/datum/verbs/parent
var/list/verblist
var/abstract = FALSE
//returns the master list for verbs of a type
/datum/verbs/proc/GetList()
CRASH("Abstract verblist for [type]")
//do things for each entry in Generate_list
//return value sets Generate_list[verbpath]
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
/datum/verbs/New()
var/mainlist = GetList()
var/ourentry = mainlist[type]
children = list()
verblist = list()
if (ourentry)
if (!islist(ourentry)) //some of our childern already loaded
qdel(src)
CRASH("Verb double load: [type]")
Add_children(ourentry)
mainlist[type] = src
Load_verbs(type, typesof("[type]/verb"))
var/datum/verbs/parent = mainlist[parent_type]
if (!parent)
mainlist[parent_type] = list(src)
else if (islist(parent))
parent += src
else
parent.Add_children(list(src))
/datum/verbs/proc/Set_parent(datum/verbs/_parent)
parent = _parent
if (abstract)
parent.Add_children(children)
var/list/verblistoftypes = list()
for(var/thing in verblist)
LAZYADD(verblistoftypes[verblist[thing]], thing)
for(var/verbparenttype in verblistoftypes)
parent.Load_verbs(verbparenttype, verblistoftypes[verbparenttype])
/datum/verbs/proc/Add_children(list/kids)
if (abstract && parent)
parent.Add_children(kids)
return
for(var/thing in kids)
var/datum/verbs/item = thing
item.Set_parent(src)
if (!item.abstract)
children += item
/datum/verbs/proc/Load_verbs(verb_parent_type, list/verbs)
if (abstract && parent)
parent.Load_verbs(verb_parent_type, verbs)
return
for (var/verbpath in verbs)
verblist[verbpath] = verb_parent_type
/datum/verbs/proc/Generate_list(...)
. = list()
if (length(children))
for (var/thing in children)
var/datum/verbs/child = thing
var/list/childlist = child.Generate_list(arglist(args))
if (childlist)
var/childname = "[child]"
if (childname == "[child.type]")
var/list/tree = splittext(childname, "/")
childname = tree[tree.len]
.[child.type] = "parent=[url_encode(type)];name=[url_encode(childname)]"
. += childlist
for (var/thing in verblist)
var/atom/verb/verbpath = thing
if (!verbpath)
stack_trace("Bad VERB in [type] verblist: [english_list(verblist)]")
var/list/entry = list()
entry["parent"] = "[type]"
entry["name"] = verbpath.desc
if (copytext(verbpath.name,1,2) == "@")
entry["command"] = copytext(verbpath.name,2)
else
entry["command"] = replacetext(verbpath.name, " ", "-")
.[verbpath] = HandleVerb(arglist(list(entry, verbpath) + args))
/world/proc/LoadVerbs(verb_type)
if(!ispath(verb_type, /datum/verbs) || verb_type == /datum/verbs)
CRASH("Invalid verb_type: [verb_type]")
for (var/typepath in subtypesof(verb_type))
new typepath()
+36 -5
View File
@@ -43,7 +43,7 @@
/area/ruin/powered/greed
icon_state = "dk_yellow"
/area/ruin/unpowered/hierophant
name = "Hierophant's Arena"
icon_state = "dk_yellow"
@@ -222,16 +222,48 @@
name = "Deep Storage"
icon_state = "storage"
/area/ruin/deepstorage/airlock
name = "Deep Storage Airlock"
icon_state = "quart"
/area/ruin/deepstorage/power
name = "Deep Storage Power and Atmospherics Room"
icon_state = "engi_storage"
/area/ruin/deepstorage/hydroponics
name = "Deep Storage Hydroponics"
icon_state = "garden"
/area/ruin/deepstorage/armory
name = "Deep Storage Secure Storage"
icon_state = "armory"
/area/ruin/deepstorage/storage
name = "Deep Storage Storage"
icon_state = "storage_wing"
/area/ruin/deepstorage/dorm
name = "Deep Storage Dormory"
icon_state = "crew_quarters"
/area/ruin/deepstorage/kitchen
name = "Deep Storage Kitchen"
icon_state = "kitchen"
/area/ruin/deepstorage/crusher
name = "Deep Storage Recycler"
icon_state = "storage"
//Ruin of Abandoned Zoo
/area/ruin/abandonedzoo
name = "Abandoned Zoo"
icon_state = "green"
//Xeno Nest
/area/ruin/xenonest
name = "The Hive"
always_unpowered = 1
@@ -239,4 +271,3 @@
power_equip = 0
power_light = 0
poweralm = 0
+20
View File
@@ -59,3 +59,23 @@
/area/shuttle/abandoned
name = "Abandoned Ship"
blob_allowed = FALSE
/area/shuttle/sbc_starfury
name = "SBC Starfury"
blob_allowed = FALSE
/area/shuttle/sbc_fighter1
name = "SBC Fighter 1"
blob_allowed = FALSE
/area/shuttle/sbc_fighter2
name = "SBC Fighter 2"
blob_allowed = FALSE
/area/shuttle/sbc_corvette
name = "SBC corvette"
blob_allowed = FALSE
/area/shuttle/syndicate_scout
name = "Syndicate Scout"
blob_allowed = FALSE
+1 -6
View File
@@ -79,13 +79,8 @@
return INITIALIZE_HINT_NORMAL
//called if Initialize returns INITIALIZE_HINT_LATELOAD
//This version shouldn't be called
/atom/proc/LateInitialize()
var/static/list/warned_types = list()
if(!warned_types[type])
WARNING("Old style LateInitialize behaviour detected in [type]!")
warned_types[type] = TRUE
Initialize(FALSE)
return
/atom/Destroy()
if(alternate_appearances)
+4
View File
@@ -679,3 +679,7 @@
set waitfor = FALSE
if(!anchored && has_gravity())
step(src, movedir)
//Returns an atom's power cell, if it has one. Overload for individual items.
/atom/movable/proc/get_cell()
return
@@ -17,7 +17,7 @@
B.leave_victim()
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(0)
C.vomit(0, toxic = TRUE)
to_chat(user, "<span class='notice'>A parasite exits our form.</span>")
var/list/bad_organs = list(
user.getorgan(/obj/item/organ/body_egg),
@@ -31,7 +31,7 @@
O.Remove(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(0)
C.vomit(0, toxic = TRUE)
O.forceMove(get_turf(user))
user.reagents.add_reagent("mutadone", 10)
@@ -57,9 +57,9 @@
/obj/effect/proc_holder/changeling/sting/transformation
name = "Transformation Sting"
desc = "We silently sting a human, injecting a retrovirus that forces them to transform."
helptext = "The victim will transform much like a changeling would. The effects will be obvious to the victim, and the process will damage our genomes."
helptext = "The victim will transform much like a changeling would. Does not provide a warning to others. Mutations will not be transferred, and monkeys will become human."
sting_icon = "sting_transform"
chemical_cost = 40
chemical_cost = 50
dna_cost = 3
var/datum/changelingprofile/selected_dna = null
@@ -86,26 +86,19 @@
return 1
/obj/effect/proc_holder/changeling/sting/transformation/sting_action(mob/user, mob/target)
set waitfor = FALSE
add_logs(user, target, "stung", "transformation sting", " new identity is [selected_dna.dna.real_name]")
var/datum/dna/NewDNA = selected_dna.dna
if(ismonkey(target))
to_chat(user, "<span class='notice'>Our genes cry out as we sting [target.name]!</span>")
var/mob/living/carbon/C = target
if(istype(C))
if(C.status_flags & CANWEAKEN)
C.do_jitter_animation(500)
C.take_bodypart_damage(20, 0) //The process is extremely painful
target.visible_message("<span class='danger'>[target] begins to violenty convulse!</span>","<span class='userdanger'>You feel a tiny prick and a begin to uncontrollably convulse!</span>")
. = TRUE
sleep(10)
if(istype(C))
C.real_name = NewDNA.real_name
NewDNA.transfer_identity(C, transfer_SE=1)
NewDNA.transfer_identity(C)
if(ismonkey(C))
C.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG)
C.updateappearance(mutcolor_update=1)
C.domutcheck()
/obj/effect/proc_holder/changeling/sting/false_armblade
+2 -3
View File
@@ -207,10 +207,9 @@ Credit where due:
text += "<br><b>The servants' objective was:</b> <br>[CLOCKCULT_OBJECTIVE]"
text += "<br>Ratvar's servants had <b>[GLOB.clockwork_caches]</b> Tinkerer's Caches."
text += "<br><b>Construction Value(CV)</b> was: <b>[GLOB.clockwork_construction_value]</b>"
var/list/scripture_states = scripture_unlock_check()
for(var/i in scripture_states)
for(var/i in SSticker.scripture_states)
if(i != SCRIPTURE_DRIVER)
text += "<br><b>[i] scripture</b> was: <b>[scripture_states[i] ? "UN":""]LOCKED</b>"
text += "<br><b>[i] scripture</b> was: <b>[SSticker.scripture_states[i] ? "UN":""]LOCKED</b>"
if(servants_of_ratvar.len)
text += "<br><b>Ratvar's servants were:</b>"
for(var/datum/mind/M in servants_of_ratvar)
@@ -204,7 +204,7 @@
else if(!GLOB.ratvar_awakens)
to_chat(user, "<span class='brass'>Hitting the [sigil_name] with brass sheets will convert them to power at a rate of <b>1</b> brass sheet to <b>[POWER_FLOOR]W</b> power.</span>")
if(!GLOB.ratvar_awakens)
to_chat(user, "<span class='brass'>You can recharge Clockwork Proselytizers from the [sigil_name].</span>")
to_chat(user, "<span class='brass'>You can recharge Replica Fabricators from the [sigil_name].</span>")
/obj/effect/clockwork/sigil/transmission/attackby(obj/item/I, mob/living/user, params)
if(is_servant_of_ratvar(user) && istype(I, /obj/item/stack/tile/brass) && !GLOB.ratvar_awakens)
@@ -29,7 +29,7 @@
if(charge)
. = min(charge, 250)
charge = use(.)
updateicon()
update_icon()
/obj/machinery/light/power_drain(clockcult_user)
if(on)
@@ -0,0 +1,372 @@
//For the clockwork fabricator, this proc exists to make it easy to customize what the fabricator does when hitting something.
//if a valid target, returns an associated list in this format;
//list("operation_time" = 15, "new_obj_type" = /obj/structure/window/reinforced/clockwork, "power_cost" = 5, "spawn_dir" = dir, "dir_in_new" = TRUE)
//otherwise, return literally any non-list thing but preferably FALSE
//returning TRUE won't produce the "cannot be fabricated" message and will still prevent fabrication
/atom/proc/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/atom/proc/consume_visual(obj/item/clockwork/replica_fabricator/fabricator, power_amount)
if(fabricator.can_use_power(power_amount))
var/obj/effect/temp_visual/ratvar/beam/itemconsume/B = new /obj/effect/temp_visual/ratvar/beam/itemconsume(get_turf(src))
B.pixel_x = pixel_x
B.pixel_y = pixel_y
//Turf conversion
/turf/closed/wall/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //four sheets of metal
return list("operation_time" = 50, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_TOTAL - (POWER_METAL * 4), "spawn_dir" = SOUTH)
/turf/closed/wall/mineral/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //two sheets of metal
return list("operation_time" = 50, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_TOTAL - (POWER_METAL * 2), "spawn_dir" = SOUTH)
/turf/closed/wall/mineral/iron/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //two sheets of metal, five rods
return list("operation_time" = 50, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_TOTAL - (POWER_METAL * 2) - (POWER_ROD * 5), "spawn_dir" = SOUTH)
/turf/closed/wall/mineral/cult/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //no metal
return list("operation_time" = 80, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_TOTAL, "spawn_dir" = SOUTH)
/turf/closed/wall/shuttle/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //two sheets of metal
return list("operation_time" = 50, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_TOTAL - (POWER_METAL * 2), "spawn_dir" = SOUTH)
/turf/closed/wall/r_wall/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/turf/closed/wall/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return list("operation_time" = 50, "new_obj_type" = /turf/open/floor/clockwork, "power_cost" = -POWER_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH)
/turf/open/floor/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(floor_tile == /obj/item/stack/tile/plasteel)
new floor_tile(src)
make_plating()
playsound(src, 'sound/items/Crowbar.ogg', 10, 1) //clink
return list("operation_time" = 30, "new_obj_type" = /turf/open/floor/clockwork, "power_cost" = POWER_FLOOR, "spawn_dir" = SOUTH)
/turf/open/floor/plating/asteroid/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/turf/open/floor/plating/ashplanet/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/turf/open/floor/plating/lava/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/turf/open/floor/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(locate(/obj/structure/table) in src)
return FALSE
if(locate(/obj/structure/falsewall) in contents)
to_chat(user, "<span class='warning'>There is a false wall in the way, preventing you from fabricating a clockwork wall on [src].</span>")
return
if(is_blocked_turf(src, TRUE))
to_chat(user, "<span class='warning'>Something is in the way, preventing you from fabricating a clockwork wall on [src].</span>")
return TRUE
var/operation_time = 100
if(!GLOB.ratvar_awakens && fabricator.speed_multiplier > 0) //if ratvar isn't awake, this always takes 10 seconds
operation_time /= fabricator.speed_multiplier
return list("operation_time" = operation_time, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH)
//False wall conversion
/obj/structure/falsewall/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/cost = POWER_WALL_MINUS_FLOOR
if(ispath(mineral, /obj/item/stack/sheet/metal))
cost -= (POWER_METAL * (2 + mineral_amount)) //four sheets of metal, plus an assumption that the girder is also two
else
cost -= (POWER_METAL * 2) //anything that doesn't use metal just has the girder
return list("operation_time" = 50, "new_obj_type" = /obj/structure/falsewall/brass, "power_cost" = cost, "spawn_dir" = SOUTH)
/obj/structure/falsewall/iron/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent) //two sheets of metal, two rods; special assumption
return list("operation_time" = 50, "new_obj_type" = /obj/structure/falsewall/brass, "power_cost" = POWER_WALL_MINUS_FLOOR - (POWER_METAL * 2) - (POWER_ROD * 2), "spawn_dir" = SOUTH)
/obj/structure/falsewall/reinforced/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/obj/structure/falsewall/brass/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Metal conversion
/obj/item/stack/tile/plasteel/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(source)
return FALSE
var/amount_temp = get_amount()
var/no_delete = FALSE
if(amount_temp < 2)
to_chat(user, "<span class='warning'>You need at least <b>2</b> floor tiles to convert into power.</span>")
return TRUE
if(IsOdd(amount_temp))
amount_temp--
no_delete = TRUE
use(amount_temp)
amount_temp *= 12.5 //each tile is 12.5 power so this is 2 tiles to 25 power
consume_visual(fabricator, amount_temp)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = -amount_temp, "spawn_dir" = SOUTH, "no_target_deletion" = no_delete)
/obj/item/stack/rods/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(source)
return FALSE
var/power_amount = -(amount*POWER_ROD)
consume_visual(fabricator, power_amount)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = power_amount, "spawn_dir" = SOUTH)
/obj/item/stack/sheet/metal/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(source)
return FALSE
var/power_amount = -(amount*POWER_METAL)
consume_visual(fabricator, power_amount)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = power_amount, "spawn_dir" = SOUTH)
/obj/item/stack/sheet/plasteel/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(source)
return FALSE
var/power_amount = -(amount*POWER_PLASTEEL)
consume_visual(fabricator, power_amount)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = power_amount, "spawn_dir" = SOUTH)
//Brass directly to power
/obj/item/stack/tile/brass/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
if(source)
return FALSE
var/power_amount = -(amount*POWER_FLOOR)
consume_visual(fabricator, power_amount)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = power_amount, "spawn_dir" = SOUTH)
//Airlock conversion
/obj/machinery/door/airlock/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/doortype = /obj/machinery/door/airlock/clockwork
if(glass)
doortype = /obj/machinery/door/airlock/clockwork/brass
return list("operation_time" = 60, "new_obj_type" = doortype, "power_cost" = POWER_WALL_TOTAL, "spawn_dir" = dir)
/obj/machinery/door/airlock/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Table conversion
/obj/structure/table/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/fabrication_cost = POWER_STANDARD
if(framestack == /obj/item/stack/rods)
fabrication_cost -= POWER_ROD*framestackamount
else if(framestack == /obj/item/stack/tile/brass)
fabrication_cost -= POWER_FLOOR*framestackamount
if(buildstack == /obj/item/stack/sheet/metal)
fabrication_cost -= POWER_METAL*buildstackamount
else if(buildstack == /obj/item/stack/sheet/plasteel)
fabrication_cost -= POWER_PLASTEEL*buildstackamount
return list("operation_time" = 20, "new_obj_type" = /obj/structure/table/reinforced/brass, "power_cost" = fabrication_cost, "spawn_dir" = SOUTH)
/obj/structure/table/reinforced/brass/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
/obj/structure/table_frame/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/fabrication_cost = POWER_FLOOR
if(framestack == /obj/item/stack/rods)
fabrication_cost -= POWER_ROD*framestackamount
else if(framestack == /obj/item/stack/tile/brass)
fabrication_cost -= POWER_FLOOR*framestackamount
return list("operation_time" = 10, "new_obj_type" = /obj/structure/table_frame/brass, "power_cost" = fabrication_cost, "spawn_dir" = SOUTH)
/obj/structure/table_frame/brass/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Window conversion
/obj/structure/window/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/windowtype = /obj/structure/window/reinforced/clockwork
var/new_dir = TRUE
var/fabrication_time = 15
var/fabrication_cost = POWER_FLOOR
if(fulltile)
windowtype = /obj/structure/window/reinforced/clockwork/fulltile
new_dir = FALSE
fabrication_time = 30
fabrication_cost = POWER_STANDARD
if(reinf)
fabrication_cost -= POWER_ROD
if(reinf)
fabrication_cost -= POWER_ROD
for(var/obj/structure/grille/G in get_turf(src))
INVOKE_ASYNC(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricate, G, user)
return list("operation_time" = fabrication_time, "new_obj_type" = windowtype, "power_cost" = fabrication_cost, "spawn_dir" = dir, "dir_in_new" = new_dir)
/obj/structure/window/reinforced/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Windoor conversion
/obj/machinery/door/window/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return list("operation_time" = 30, "new_obj_type" = /obj/machinery/door/window/clockwork, "power_cost" = POWER_STANDARD, "spawn_dir" = dir, "dir_in_new" = TRUE)
/obj/machinery/door/window/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Grille conversion
/obj/structure/grille/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/grilletype = /obj/structure/grille/ratvar
var/fabrication_time = 15
if(broken)
grilletype = /obj/structure/grille/ratvar/broken
fabrication_time = 5
return list("operation_time" = fabrication_time, "new_obj_type" = grilletype, "power_cost" = 0, "spawn_dir" = dir)
/obj/structure/grille/ratvar/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Lattice conversion
/obj/structure/lattice/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return list("operation_time" = 0, "new_obj_type" = /obj/structure/lattice/clockwork, "power_cost" = 0, "spawn_dir" = SOUTH, "no_target_deletion" = TRUE)
/obj/structure/lattice/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
ratvar_act() //just in case we're the wrong type for some reason??
return FALSE
/obj/structure/lattice/catwalk/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return list("operation_time" = 0, "new_obj_type" = /obj/structure/lattice/catwalk/clockwork, "power_cost" = 0, "spawn_dir" = SOUTH, "no_target_deletion" = TRUE)
/obj/structure/lattice/catwalk/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
return FALSE
//Girder conversion
/obj/structure/girder/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
var/fabrication_cost = POWER_GEAR - (POWER_METAL * 2)
if(state == GIRDER_REINF_STRUTS || state == GIRDER_REINF)
fabrication_cost -= POWER_PLASTEEL
return list("operation_time" = 20, "new_obj_type" = /obj/structure/destructible/clockwork/wall_gear, "power_cost" = fabrication_cost, "spawn_dir" = SOUTH)
//Hitting a clockwork structure will try to repair it.
/obj/structure/destructible/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
. = TRUE
var/list/repair_values = list()
if(!fabricator.fabricator_repair_checks(repair_values, src, user))
return
user.visible_message("<span class='notice'>[user]'s [fabricator.name] starts covering [src] in glowing orange energy...</span>", \
"<span class='alloy'>You start repairing [src]...</span>")
fabricator.repairing = src
while(fabricator && user && src)
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
break
obj_integrity = Clamp(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
fabricator.modify_stored_power(-repair_values["power_required"])
playsound(src, 'sound/machines/click.ogg', 50, 1)
if(fabricator)
fabricator.repairing = null
if(user)
user.visible_message("<span class='notice'>[user]'s [fabricator.name] stops covering [src] with glowing orange energy.</span>", \
"<span class='alloy'>You finish repairing [src]. It is now at <b>[obj_integrity]/[max_integrity]</b> integrity.</span>")
//Hitting a sigil of transmission will try to charge from it.
/obj/effect/clockwork/sigil/transmission/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
. = TRUE
var/list/charge_values = list()
if(!fabricator.sigil_charge_checks(charge_values, src, user))
return
user.visible_message("<span class='notice'>[user]'s [fabricator.name] starts draining glowing orange energy from [src]...</span>", \
"<span class='alloy'>You start recharging your [fabricator.name]...</span>")
fabricator.recharging = src
while(fabricator && user && src)
if(!do_after(user, 10, target = src, extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/sigil_charge_checks, charge_values, src, user, TRUE)))
break
modify_charge(charge_values["power_gain"])
fabricator.modify_stored_power(charge_values["power_gain"])
playsound(src, 'sound/effects/light_flicker.ogg', charge_values["power_gain"] * 0.1, 1)
if(fabricator)
fabricator.recharging = null
if(user)
user.visible_message("<span class='notice'>[user]'s [fabricator.name] stops draining glowing orange energy from [src].</span>", \
"<span class='alloy'>You finish recharging your [fabricator.name]. It now contains <b>[fabricator.get_power()]W/[fabricator.get_max_power()]W</b> power.</span>")
//Fabricator mob heal proc, to avoid as much copypaste as possible.
/mob/living/proc/fabricator_heal(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator)
var/list/repair_values = list()
if(!fabricator.fabricator_repair_checks(repair_values, src, user))
return
user.visible_message("<span class='notice'>[user]'s [fabricator.name] starts coverin[src == user ? "g [user.p_them()]" : "g [src]"] in glowing orange energy...</span>", \
"<span class='alloy'>You start repairin[src == user ? "g yourself" : "g [src]"]...</span>")
fabricator.repairing = src
while(fabricator && user && src)
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
break
fabricator_heal_tick(repair_values["healing_for_cycle"])
fabricator.modify_stored_power(-repair_values["power_required"])
playsound(src, 'sound/machines/click.ogg', 50, 1)
if(fabricator)
fabricator.repairing = null
return TRUE
/mob/living/proc/fabricator_heal_tick(amount)
var/static/list/damage_heal_order = list(BRUTE, BURN, TOX, OXY)
heal_ordered_damage(amount, damage_heal_order)
/mob/living/simple_animal/fabricator_heal_tick(amount)
adjustHealth(-amount)
//Hitting a ratvar'd silicon will also try to repair it.
/mob/living/silicon/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
. = TRUE
if(health == maxHealth) //if we're at maximum health, replace the turf under us
return FALSE
else if(fabricator_heal(user, fabricator) && user)
user.visible_message("<span class='notice'>[user]'s [fabricator.name] stops coverin[src == user ? "g [user.p_them()]" : "g [src]"] with glowing orange energy.</span>", \
"<span class='alloy'>You finish repairin[src == user ? "g yourself. You are":"g [src]. [p_they(TRUE)] [p_are()]"] now at <b>[abs(HEALTH_THRESHOLD_DEAD - health)]/[abs(HEALTH_THRESHOLD_DEAD - maxHealth)]</b> health.</span>")
//Same with clockwork mobs.
/mob/living/simple_animal/hostile/clockwork/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
. = TRUE
if(health == maxHealth) //if we're at maximum health, replace the turf under us
return FALSE
else if(fabricator_heal(user, fabricator) && user)
user.visible_message("<span class='notice'>[user]'s [fabricator.name] stops coverin[src == user ? "g [user.p_them()]" : "g [src]"] with glowing orange energy.</span>", \
"<span class='alloy'>You finish repairin[src == user ? "g yourself. You are":"g [src]. [p_they(TRUE)] [p_are()]"] now at <b>[health]/[maxHealth]</b> health.</span>")
//Cogscarabs get special interaction because they're drones and have innate self-heals/revives.
/mob/living/simple_animal/drone/cogscarab/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent)
. = TRUE
if(stat == DEAD)
try_reactivate(user) //if we're dead, try to repair us
return
if(health == maxHealth)
return FALSE
else if(!(flags & GODMODE))
user.visible_message("<span class='notice'>[user]'s [fabricator.name] starts coverin[src == user ? "g [user.p_them()]" : "g [src]"] in glowing orange energy...</span>", \
"<span class='alloy'>You start repairin[src == user ? "g yourself" : "g [src]"]...</span>")
fabricator.repairing = src
if(do_after(user, (maxHealth - health)*2, target=src))
adjustHealth(-maxHealth)
user.visible_message("<span class='notice'>[user]'s [fabricator.name] stops coverin[src == user ? "g [user.p_them()]" : "g [src]"] with glowing orange energy.</span>", \
"<span class='alloy'>You finish repairin[src == user ? "g yourself" : "g [src]"].</span>")
if(fabricator)
fabricator.repairing = null
//Convert shards and gear bits directly to power
/obj/item/clockwork/alloy_shards/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent, power_amount)
if(!power_amount)
power_amount = -POWER_STANDARD
consume_visual(fabricator, power_amount)
if(!silent) //looper no looping
for(var/obj/item/clockwork/alloy_shards/S in get_turf(src)) //convert all other shards in the turf if we can
if(S == src)
continue //we want the shards to be fabricated after the main shard, thus this delay
addtimer(CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricate, S, user, TRUE), 0)
return list("operation_time" = 0, "new_obj_type" = null, "power_cost" = power_amount, "spawn_dir" = SOUTH)
/obj/item/clockwork/alloy_shards/medium/gear_bit/large/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent, power_amount)
if(!power_amount)
power_amount = -(CLOCKCULT_POWER_UNIT*0.08)
return ..()
/obj/item/clockwork/alloy_shards/large/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent, power_amount)
if(!power_amount)
power_amount = -(CLOCKCULT_POWER_UNIT*0.06)
return ..()
/obj/item/clockwork/alloy_shards/medium/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent, power_amount)
if(!power_amount)
power_amount = -(CLOCKCULT_POWER_UNIT*0.04)
return ..()
/obj/item/clockwork/alloy_shards/small/fabrication_vals(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator, silent, power_amount)
if(!power_amount)
power_amount = -(CLOCKCULT_POWER_UNIT*0.02)
return ..()
@@ -49,6 +49,9 @@
/turf/open/floor/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
if(locate(/obj/structure/table) in src)
return FALSE
if(locate(/obj/structure/falsewall) in contents)
to_chat(user, "<span class='warning'>There is a false wall in the way, preventing you from proselytizing [src] into a clockwork wall.</span>")
return
if(is_blocked_turf(src, TRUE))
to_chat(user, "<span class='warning'>Something is in the way, preventing you from proselytizing [src] into a clockwork wall.</span>")
return TRUE
@@ -7,13 +7,17 @@
servants++
. = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
//Drivers: always unlocked
.[SCRIPTURE_SCRIPT] = (servants >= SCRIPT_SERVANT_REQ && GLOB.clockwork_caches >= SCRIPT_CACHE_REQ)
.[SCRIPTURE_SCRIPT] = (SSticker.scripture_states[SCRIPTURE_SCRIPT] || \
(servants >= SCRIPT_SERVANT_REQ && GLOB.clockwork_caches >= SCRIPT_CACHE_REQ))
//Script: SCRIPT_SERVANT_REQ or more non-brain servants and SCRIPT_CACHE_REQ or more clockwork caches
.[SCRIPTURE_APPLICATION] = (servants >= APPLICATION_SERVANT_REQ && GLOB.clockwork_caches >= APPLICATION_CACHE_REQ && GLOB.clockwork_construction_value >= APPLICATION_CV_REQ)
.[SCRIPTURE_APPLICATION] = (SSticker.scripture_states[SCRIPTURE_APPLICATION] || \
(servants >= APPLICATION_SERVANT_REQ && GLOB.clockwork_caches >= APPLICATION_CACHE_REQ && GLOB.clockwork_construction_value >= APPLICATION_CV_REQ))
//Application: APPLICATION_SERVANT_REQ or more non-brain servants, APPLICATION_CACHE_REQ or more clockwork caches, and at least APPLICATION_CV_REQ CV
.[SCRIPTURE_REVENANT] = (servants >= REVENANT_SERVANT_REQ && GLOB.clockwork_caches >= REVENANT_CACHE_REQ && GLOB.clockwork_construction_value >= REVENANT_CV_REQ)
.[SCRIPTURE_REVENANT] = (SSticker.scripture_states[SCRIPTURE_REVENANT] || \
(servants >= REVENANT_SERVANT_REQ && GLOB.clockwork_caches >= REVENANT_CACHE_REQ && GLOB.clockwork_construction_value >= REVENANT_CV_REQ))
//Revenant: REVENANT_SERVANT_REQ or more non-brain servants, REVENANT_CACHE_REQ or more clockwork caches, and at least REVENANT_CV_REQ CV
.[SCRIPTURE_JUDGEMENT] = (servants >= JUDGEMENT_SERVANT_REQ && GLOB.clockwork_caches >= JUDGEMENT_CACHE_REQ && GLOB.clockwork_construction_value >= JUDGEMENT_CV_REQ && !unconverted_ai_exists)
.[SCRIPTURE_JUDGEMENT] = (SSticker.scripture_states[SCRIPTURE_JUDGEMENT] || \
(servants >= JUDGEMENT_SERVANT_REQ && GLOB.clockwork_caches >= JUDGEMENT_CACHE_REQ && GLOB.clockwork_construction_value >= JUDGEMENT_CV_REQ && !unconverted_ai_exists))
//Judgement: JUDGEMENT_SERVANT_REQ or more non-brain servants, JUDGEMENT_CACHE_REQ or more clockwork caches, at least JUDGEMENT_CV_REQ CV, and there are no living, non-servant ais
//reports to servants when scripture is locked or unlocked
@@ -59,3 +63,6 @@
//changes construction value
/proc/change_construction_value(amount)
GLOB.clockwork_construction_value += amount
/proc/can_recite_scripture(mob/living/L, can_potentially)
return (is_servant_of_ratvar(L) && (can_potentially || (L.stat == CONSCIOUS && L.can_speak_vocal())) && (GLOB.ratvar_awakens || (ishuman(L) || issilicon(L))))
@@ -69,7 +69,7 @@
/obj/item/clockwork/component/vanguard_cogwheel/onyx_prism
name = "onyx prism"
desc = "An onyx prism with a small aperture. It's very heavy."
clockwork_desc = "A broken prism from a mending motor. <b>Serviceable as a substitute for a vanguard cogwheel.</b>"
clockwork_desc = "A broken prism from a prolonging prism. <b>Serviceable as a substitute for a vanguard cogwheel.</b>"
icon_state = "onyx_prism"
cultist_message = "The prism grows painfully hot in your hands."
servant_of_ratvar_messages = list("The prism isn't getting any lighter." = FALSE, "\"So... you haven't failed yet. Have hope, child.\"" = TRUE, \
@@ -153,11 +153,11 @@
icon_state = "obelisk_prism"
w_class = WEIGHT_CLASS_NORMAL
//Shards of Alloy, suitable only for proselytization.
//Shards of Alloy, suitable only as a source of power for a replica fabricator.
/obj/item/clockwork/alloy_shards
name = "replicant alloy shards"
desc = "Broken shards of some oddly malleable metal. They occasionally move and seem to glow."
clockwork_desc = "Broken shards of replicant alloy. Can be proselytized for additional power."
clockwork_desc = "Broken shards of replicant alloy."
icon_state = "alloy_shards"
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/randomsinglesprite = FALSE
@@ -172,10 +172,15 @@
pixel_x = rand(-sprite_shift, sprite_shift)
pixel_y = rand(-sprite_shift, sprite_shift)
/obj/item/clockwork/alloy_shards/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
to_chat(user, "<span class='brass'>Can be consumed by a replica fabricator as a source of power.</span>")
/obj/item/clockwork/alloy_shards/proc/replace_name_desc()
name = "replicant alloy shard"
desc = "A broken shard of some oddly malleable metal. It occasionally moves and seems to glow."
clockwork_desc = "A broken shard of replicant alloy. Can be proselytized for additional power."
clockwork_desc = "A broken shard of replicant alloy."
/obj/item/clockwork/alloy_shards/large
w_class = WEIGHT_CLASS_TINY
@@ -197,7 +202,7 @@
/obj/item/clockwork/alloy_shards/medium/gear_bit/replace_name_desc()
name = "gear bit"
desc = "A broken chunk of a gear. You want it."
clockwork_desc = "A broken chunk of a gear. Can be proselytized for additional power."
clockwork_desc = "A broken chunk of a gear."
/obj/item/clockwork/alloy_shards/medium/gear_bit/large //gives more power
@@ -215,5 +220,5 @@
/obj/item/clockwork/alloy_shards/pinion_lock
name = "pinion lock"
desc = "A dented and scratched gear. It's very heavy."
clockwork_desc = "A broken gear lock for pinion airlocks. Can be proselytized for additional power."
clockwork_desc = "A broken gear lock for pinion airlocks"
icon_state = "pinion_lock"
@@ -25,7 +25,7 @@
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
flags &= ~STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
@@ -37,7 +37,7 @@
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their head!</span>", "<span class='warning'>The helmet flickers off your head, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(20, 1, 1, 0, 1)
C.vomit(20)
else
to_chat(user, "<span class='heavy_brass'>\"Do you have a hole in your head? You're about to.\"</span>")
to_chat(user, "<span class='userdanger'>The helmet tries to drive a spike through your head as you scramble to remove it!</span>")
@@ -81,7 +81,7 @@
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
flags &= ~STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
@@ -98,7 +98,7 @@
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their body!</span>", "<span class='warning'>The curiass flickers off your body, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(20, 1, 1, 0, 1)
C.vomit(20)
else
to_chat(user, "<span class='heavy_brass'>\"I think this armor is too hot for you to handle.\"</span>")
to_chat(user, "<span class='userdanger'>The curiass emits a burst of flame as you scramble to get it off!</span>")
@@ -142,7 +142,7 @@
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
flags &= ~STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
@@ -159,7 +159,7 @@
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their arms!</span>", "<span class='warning'>The gauntlets flicker off your arms, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(10, 1, 1, 0, 1)
C.vomit()
else
to_chat(user, "<span class='heavy_brass'>\"Did you like having arms?\"</span>")
to_chat(user, "<span class='userdanger'>The gauntlets suddenly squeeze tight, crushing your arms before you manage to get them off!</span>")
@@ -194,7 +194,7 @@
if(GLOB.ratvar_awakens)
flags |= NOSLIP
else
flags &= NOSLIP
flags &= ~NOSLIP
/obj/item/clothing/shoes/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
if(equipper && !is_servant_of_ratvar(equipper))
@@ -209,7 +209,7 @@
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their feet!</span>", "<span class='warning'>The treads flicker off your feet, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(10, 1, 1, 0, 1)
C.vomit()
else
to_chat(user, "<span class='heavy_brass'>\"Let's see if you can dance with these.\"</span>")
to_chat(user, "<span class='userdanger'>The treads turn searing hot as you scramble to get them off!</span>")
@@ -14,7 +14,6 @@
var/target_component_id //the target component ID to create, if any
var/no_cost = FALSE //If the slab is admin-only and needs no components and has no scripture locks
var/speed_multiplier = 1 //multiples how fast this slab recites scripture
var/nonhuman_usable = FALSE //if the slab can be used by nonhumans, defaults to off
var/produces_components = TRUE //if it produces components at all
var/selected_scripture = SCRIPTURE_DRIVER
var/recollecting = FALSE //if we're looking at fancy recollection
@@ -33,29 +32,24 @@
no_cost = TRUE
produces_components = FALSE
/obj/item/clockwork/slab/scarab
nonhuman_usable = TRUE
/obj/item/clockwork/slab/debug
speed_multiplier = 0
no_cost = TRUE
nonhuman_usable = TRUE
/obj/item/clockwork/slab/debug/attack_hand(mob/living/user)
..()
if(!is_servant_of_ratvar(user))
add_servant_of_ratvar(user)
/obj/item/clockwork/slab/cyborg //three scriptures, plus a spear and proselytizer
/obj/item/clockwork/slab/cyborg //three scriptures, plus a spear and fabricator
clockwork_desc = "A divine link to the Celestial Derelict, allowing for limited recital of scripture.\n\
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
nonhuman_usable = TRUE
quickbound = list(/datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/ranged_ability/linked_vanguard, \
/datum/clockwork_scripture/create_object/tinkerers_cache)
maximum_quickbound = 6 //we usually have one or two unique scriptures, so if ratvar is up let us bind one more
actions_types = list()
/obj/item/clockwork/slab/cyborg/engineer //five scriptures, plus a proselytizer
/obj/item/clockwork/slab/cyborg/engineer //five scriptures, plus a fabricator
quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/create_object/cogscarab, \
/datum/clockwork_scripture/create_object/soul_vessel, /datum/clockwork_scripture/create_object/sigil_of_transmission, /datum/clockwork_scripture/create_object/interdiction_lens)
@@ -71,7 +65,7 @@
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade, \
/datum/clockwork_scripture/channeled/volt_void/cyborg)
/obj/item/clockwork/slab/cyborg/janitor //five scriptures, plus a proselytizer
/obj/item/clockwork/slab/cyborg/janitor //five scriptures, plus a fabricator
quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/create_object/sigil_of_transgression, \
/datum/clockwork_scripture/create_object/ocular_warden, /datum/clockwork_scripture/create_object/mania_motor, /datum/clockwork_scripture/create_object/tinkerers_daemon)
@@ -106,12 +100,6 @@
slab_ability = null
return ..()
/obj/item/clockwork/slab/ratvar_act()
if(GLOB.ratvar_awakens)
nonhuman_usable = TRUE
else
nonhuman_usable = initial(nonhuman_usable)
/obj/item/clockwork/slab/dropped(mob/user)
. = ..()
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
@@ -138,7 +126,7 @@
production_time = world.time + SLAB_PRODUCTION_TIME + production_slowdown
var/mob/living/L
L = get_atom_on_turf(src, /mob/living)
if(istype(L) && is_servant_of_ratvar(L) && (nonhuman_usable || ishuman(L)))
if(istype(L) && can_recite_scripture(L))
var/component_to_generate = target_component_id
if(!component_to_generate)
component_to_generate = get_weighted_component_id(src) //more likely to generate components that we have less of
@@ -268,7 +256,7 @@
if(busy)
to_chat(user, "<span class='warning'>[src] refuses to work, displaying the message: \"[busy]!\"</span>")
return 0
if(!nonhuman_usable && !ishuman(user))
if(!can_recite_scripture(user))
to_chat(user, "<span class='nezbere'>[src] hums fitfully in your hands, but doesn't seem to do anything...</span>")
return 0
access_display(user)
@@ -288,15 +276,14 @@
ui.open()
/obj/item/clockwork/slab/proc/recite_scripture(datum/clockwork_scripture/scripture, mob/living/user)
if(!scripture || !user || !user.canUseTopic(src) || (!nonhuman_usable && !ishuman(user)))
if(!scripture || !user || !user.canUseTopic(src) || !can_recite_scripture(user))
return FALSE
if(user.get_active_held_item() != src)
to_chat(user, "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>")
return FALSE
var/initial_tier = initial(scripture.tier)
if(initial_tier != SCRIPTURE_PERIPHERAL)
var/list/tiers_of_scripture = scripture_unlock_check()
if(!GLOB.ratvar_awakens && !no_cost && !tiers_of_scripture[initial_tier])
if(!GLOB.ratvar_awakens && !no_cost && !SSticker.scripture_states[initial_tier])
to_chat(user, "<span class='warning'>That scripture is not unlocked, and cannot be recited!</span>")
return FALSE
var/datum/clockwork_scripture/scripture_to_recite = new scripture
@@ -415,13 +402,25 @@
if(SCRIPTURE_DRIVER)
data["tier_info"] = "<font color=#B18B25><i>These scriptures are always unlocked.</i></font>"
if(SCRIPTURE_SCRIPT)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[SCRIPT_SERVANT_REQ]</b> Servants and <b>[SCRIPT_CACHE_REQ]</b> Tinkerer's Cache.</i></font>"
if(SSticker.scripture_states[SCRIPTURE_SCRIPT])
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
else
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[SCRIPT_SERVANT_REQ]</b> Servants and <b>[SCRIPT_CACHE_REQ]</b> Tinkerer's Cache.</i></font>"
if(SCRIPTURE_APPLICATION)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[APPLICATION_SERVANT_REQ]</b> Servants, <b>[APPLICATION_CACHE_REQ]</b> Tinkerer's Caches, and <b>[APPLICATION_CV_REQ]CV</b>.</i></font>"
if(SSticker.scripture_states[SCRIPTURE_APPLICATION])
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
else
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[APPLICATION_SERVANT_REQ]</b> Servants, <b>[APPLICATION_CACHE_REQ]</b> Tinkerer's Caches, and <b>[APPLICATION_CV_REQ]CV</b>.</i></font>"
if(SCRIPTURE_REVENANT)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[REVENANT_SERVANT_REQ]</b> Servants, <b>[REVENANT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[REVENANT_CV_REQ]CV</b>.</i></font>"
if(SSticker.scripture_states[SCRIPTURE_REVENANT])
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
else
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[REVENANT_SERVANT_REQ]</b> Servants, <b>[REVENANT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[REVENANT_CV_REQ]CV</b>.</i></font>"
if(SCRIPTURE_JUDGEMENT)
data["tier_info"] = "<font color=#B18B25><i>This scripture requires at least <b>[JUDGEMENT_SERVANT_REQ]</b> Servants, <b>[JUDGEMENT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[JUDGEMENT_CV_REQ]CV</b>.<br>In addition, there may not be any active non-Servant AIs.</i></font>"
if(SSticker.scripture_states[SCRIPTURE_JUDGEMENT])
data["tier_info"] = "<font color=#B18B25><b>This scripture is permenantly unlocked.</b></font>"
else
data["tier_info"] = "<font color=#B18B25><i>This scripture requires at least <b>[JUDGEMENT_SERVANT_REQ]</b> Servants, <b>[JUDGEMENT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[JUDGEMENT_CV_REQ]CV</b>.<br>In addition, there may not be any active non-Servant AIs.</i></font>"
data["selected"] = selected_scripture
@@ -1,51 +1,48 @@
//Clockwork proselytizer: Converts applicable objects to Ratvarian variants.
/obj/item/clockwork/clockwork_proselytizer
name = "clockwork proselytizer"
//Replica Fabricator: Converts applicable objects to Ratvarian variants.
/obj/item/clockwork/replica_fabricator
name = "replica fabricator"
desc = "An odd, L-shaped device that hums with energy."
clockwork_desc = "A device that allows the replacing of mundane objects with Ratvarian variants. It requires power to function."
icon_state = "clockwork_proselytizer"
icon_state = "replica_fabricator"
w_class = WEIGHT_CLASS_NORMAL
force = 5
flags = NOBLUDGEON
var/stored_power = 0 //Requires power to function
var/max_power = CLOCKCULT_POWER_UNIT * 10
var/uses_power = TRUE
var/metal_to_power = FALSE
var/repairing = null //what we're currently repairing, if anything
var/obj/effect/clockwork/sigil/transmission/recharging = null //the sigil we're charging from, if any
var/speed_multiplier = 1 //how fast this proselytizer works
var/speed_multiplier = 1 //how fast this fabricator works
var/charge_rate = MIN_CLOCKCULT_POWER //how much power we gain every two seconds
var/charge_delay = 2 //how many proccess ticks remain before we can start to charge
/obj/item/clockwork/clockwork_proselytizer/preloaded
/obj/item/clockwork/replica_fabricator/preloaded
stored_power = POWER_WALL_MINUS_FLOOR+POWER_WALL_TOTAL
/obj/item/clockwork/clockwork_proselytizer/scarab
name = "scarab proselytizer"
clockwork_desc = "A cogscarab's internal proselytizer. It can only be successfully used by a cogscarab and requires power to function."
metal_to_power = TRUE
/obj/item/clockwork/replica_fabricator/scarab
name = "scarab fabricator"
clockwork_desc = "A cogscarab's internal fabricator. It can only be successfully used by a cogscarab and requires power to function."
item_state = "nothing"
w_class = WEIGHT_CLASS_TINY
speed_multiplier = 0.5
charge_rate = MIN_CLOCKCULT_POWER * 2
var/debug = FALSE
/obj/item/clockwork/clockwork_proselytizer/scarab/proselytize(atom/target, mob/living/user)
/obj/item/clockwork/replica_fabricator/scarab/fabricate(atom/target, mob/living/user)
if(!debug && !isdrone(user))
return 0
return ..()
/obj/item/clockwork/clockwork_proselytizer/scarab/debug
clockwork_desc = "A cogscarab's internal proselytizer. It can convert nearly any object into a Ratvarian variant."
/obj/item/clockwork/replica_fabricator/scarab/debug
clockwork_desc = "A cogscarab's internal fabricator. It can convert nearly any object into a Ratvarian variant."
uses_power = FALSE
debug = TRUE
/obj/item/clockwork/clockwork_proselytizer/cyborg
name = "cyborg proselytizer"
clockwork_desc = "A cyborg's internal proselytizer. It is capable of using the cyborg's power in addition to stored power."
metal_to_power = TRUE
/obj/item/clockwork/replica_fabricator/cyborg
name = "cyborg fabricator"
clockwork_desc = "A cyborg's internal fabricator. It is capable of using the cyborg's power in addition to stored power."
/obj/item/clockwork/clockwork_proselytizer/cyborg/get_power() //returns power and cyborg's power
/obj/item/clockwork/replica_fabricator/cyborg/get_power() //returns power and cyborg's power
var/mob/living/silicon/robot/R = get_atom_on_turf(src, /mob/living)
var/borg_power = 0
var/current_charge = 0
@@ -56,14 +53,14 @@
borg_power += MIN_CLOCKCULT_POWER
return ..() + borg_power
/obj/item/clockwork/clockwork_proselytizer/cyborg/get_max_power()
/obj/item/clockwork/replica_fabricator/cyborg/get_max_power()
var/mob/living/silicon/robot/R = get_atom_on_turf(src, /mob/living)
var/cell_maxcharge = 0
if(istype(R) && R.cell)
cell_maxcharge = R.cell.maxcharge
return ..() + cell_maxcharge
/obj/item/clockwork/clockwork_proselytizer/cyborg/can_use_power(amount)
/obj/item/clockwork/replica_fabricator/cyborg/can_use_power(amount)
if(amount != RATVAR_POWER_CHECK)
var/mob/living/silicon/robot/R = get_atom_on_turf(src, /mob/living)
var/current_charge = 0
@@ -76,7 +73,7 @@
return FALSE
. = ..()
/obj/item/clockwork/clockwork_proselytizer/cyborg/modify_stored_power(amount)
/obj/item/clockwork/replica_fabricator/cyborg/modify_stored_power(amount)
var/mob/living/silicon/robot/R = get_atom_on_turf(src, /mob/living)
if(istype(R) && R.cell && amount)
if(amount < 0)
@@ -89,15 +86,15 @@
amount -= MIN_CLOCKCULT_POWER
. = ..()
/obj/item/clockwork/clockwork_proselytizer/Initialize()
/obj/item/clockwork/replica_fabricator/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/clockwork/clockwork_proselytizer/Destroy()
/obj/item/clockwork/replica_fabricator/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clockwork/clockwork_proselytizer/process()
/obj/item/clockwork/replica_fabricator/process()
if(!charge_rate)
return
var/mob/living/L = get_atom_on_turf(src, /mob/living)
@@ -106,14 +103,14 @@
charge_delay--
return
modify_stored_power(charge_rate)
for(var/obj/item/clockwork/clockwork_proselytizer/S in L.GetAllContents()) //no multiple proselytizers
for(var/obj/item/clockwork/replica_fabricator/S in L.GetAllContents()) //no multiple fabricators
if(S == src)
continue
S.charge_delay = 2
else
charge_delay = 2
/obj/item/clockwork/clockwork_proselytizer/ratvar_act()
/obj/item/clockwork/replica_fabricator/ratvar_act()
if(GLOB.nezbere_invoked)
charge_rate = 1250
else
@@ -125,21 +122,19 @@
uses_power = initial(uses_power)
speed_multiplier = initial(speed_multiplier)
/obj/item/clockwork/clockwork_proselytizer/examine(mob/living/user)
/obj/item/clockwork/replica_fabricator/examine(mob/living/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
to_chat(user, "<span class='brass'>Can be used to convert walls, floors, windows, airlocks, and a variety of other objects to clockwork variants.</span>")
to_chat(user, "<span class='brass'>Can also form some objects into Brass sheets, as well as reform Clockwork Walls into Clockwork Floors, and vice versa.</span>")
to_chat(user, "<span class='brass'>Can be used to replace walls, floors, tables, windows, windoors, and airlocks with Clockwork variants.</span>")
to_chat(user, "<span class='brass'>Can construct Clockwork Walls on Clockwork Floors and deconstruct Clockwork Walls to Clockwork Floors.</span>")
if(uses_power)
if(metal_to_power)
to_chat(user, "<span class='alloy'>It can convert rods, metal, plasteel, and brass to power at rates of <b>1:[POWER_ROD]W</b>, <b>1:[POWER_METAL]W</b>, \
<b>1:[POWER_PLASTEEL]W</b>, and <b>1:[POWER_FLOOR]W</b>, respectively.</span>")
else
to_chat(user, "<span class='alloy'>It can convert brass to power at a rate of <b>1:[POWER_FLOOR]W</b>.</span>")
to_chat(user, "<span class='alloy'>It is storing <b>[get_power()]W/[get_max_power()]W</b> of power, and is gaining <b>[charge_rate*0.5]W</b> of power per second.</span>")
to_chat(user, "<span class='alloy'>It can consume floor tiles, rods, metal, and plasteel for power at rates of <b>2:[POWER_ROD]W</b>, <b>1:[POWER_ROD]W</b>, <b>1:[POWER_METAL]W</b>, \
and <b>1:[POWER_PLASTEEL]W</b>, respectively.</span>")
to_chat(user, "<span class='alloy'>It can also consume brass sheets for power at a rate of <b>1:[POWER_FLOOR]W</b>.</span>")
to_chat(user, "<span class='alloy'>It is storing <b>[get_power()]W/[get_max_power()]W</b> of power[charge_rate ? ", and is gaining <b>[charge_rate*0.5]W</b> of power per second":""].</span>")
to_chat(user, "<span class='alloy'>Use it in-hand to produce <b>5</b> brass sheets at a cost of <b>[POWER_WALL_TOTAL]W</b> power.</span>")
/obj/item/clockwork/clockwork_proselytizer/attack_self(mob/living/user)
/obj/item/clockwork/replica_fabricator/attack_self(mob/living/user)
if(is_servant_of_ratvar(user))
if(uses_power)
if(!can_use_power(POWER_WALL_TOTAL))
@@ -148,24 +143,24 @@
modify_stored_power(-POWER_WALL_TOTAL)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
new/obj/item/stack/tile/brass(user.loc, 5)
to_chat(user, "<span class='brass'>You user [stored_power ? "some":"all"] of [src]'s power to produce some brass sheets. It now stores <b>[get_power()]W/[get_max_power()]W</b> of power.</span>")
to_chat(user, "<span class='brass'>You use [stored_power ? "some":"all"] of [src]'s power to produce <b>5</b> brass sheets. It now stores <b>[get_power()]W/[get_max_power()]W</b> of power.</span>")
/obj/item/clockwork/clockwork_proselytizer/pre_attackby(atom/target, mob/living/user, params)
/obj/item/clockwork/replica_fabricator/pre_attackby(atom/target, mob/living/user, params)
if(!target || !user || !is_servant_of_ratvar(user) || istype(target, /obj/item/weapon/storage))
return TRUE
return proselytize(target, user)
return fabricate(target, user)
/obj/item/clockwork/clockwork_proselytizer/proc/get_power()
/obj/item/clockwork/replica_fabricator/proc/get_power()
return stored_power
/obj/item/clockwork/clockwork_proselytizer/proc/get_max_power()
/obj/item/clockwork/replica_fabricator/proc/get_max_power()
return max_power
/obj/item/clockwork/clockwork_proselytizer/proc/modify_stored_power(amount)
/obj/item/clockwork/replica_fabricator/proc/modify_stored_power(amount)
stored_power = Clamp(stored_power + amount, 0, max_power)
return TRUE
/obj/item/clockwork/clockwork_proselytizer/proc/can_use_power(amount)
/obj/item/clockwork/replica_fabricator/proc/can_use_power(amount)
if(amount == RATVAR_POWER_CHECK)
if(GLOB.ratvar_awakens || !uses_power)
return TRUE
@@ -178,7 +173,7 @@
return TRUE
//A note here; return values are for if we CAN BE PUT ON A TABLE, not IF WE ARE SUCCESSFUL, unless no_table_check is TRUE
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize(atom/target, mob/living/user, silent, no_table_check)
/obj/item/clockwork/replica_fabricator/proc/fabricate(atom/target, mob/living/user, silent, no_table_check)
if(!target || !user)
return FALSE
if(repairing)
@@ -189,59 +184,77 @@
if(!silent)
to_chat(user, "<span class='warning'>You are currently recharging [src] from the [recharging.sigil_name]!</span>")
return FALSE
var/list/proselytize_values = target.proselytize_vals(user, src, silent) //relevant values for proselytizing stuff, given as an associated list
if(!islist(proselytize_values))
if(proselytize_values != TRUE) //if we get true, fail, but don't send a message for whatever reason
if(!isturf(target)) //otherwise, if we didn't get TRUE and the original target wasn't a turf, try to proselytize the turf
return proselytize(get_turf(target), user, no_table_check)
var/list/fabrication_values = target.fabrication_vals(user, src, silent) //relevant values for fabricating stuff, given as an associated list
if(!islist(fabrication_values))
if(fabrication_values != TRUE) //if we get true, fail, but don't send a message for whatever reason
if(!isturf(target)) //otherwise, if we didn't get TRUE and the original target wasn't a turf, try to fabricate the turf
return fabricate(get_turf(target), user, no_table_check)
if(!silent)
to_chat(user, "<span class='warning'>[target] cannot be proselytized!</span>")
to_chat(user, "<span class='warning'>[target] cannot be fabricated!</span>")
if(!no_table_check)
return TRUE
return FALSE
if(can_use_power(RATVAR_POWER_CHECK))
proselytize_values["power_cost"] = 0
fabrication_values["power_cost"] = 0
var/turf/Y = get_turf(user)
if(!Y || (Y.z != ZLEVEL_STATION && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND))
proselytize_values["operation_time"] *= 2
if(proselytize_values["power_cost"] > 0)
proselytize_values["power_cost"] *= 2
fabrication_values["operation_time"] *= 2
if(fabrication_values["power_cost"] > 0)
fabrication_values["power_cost"] *= 2
var/target_type = target.type
if(!proselytize_checks(proselytize_values, target, target_type, user, silent))
if(!fabricate_checks(fabrication_values, target, target_type, user, silent))
return FALSE
proselytize_values["operation_time"] *= speed_multiplier
fabrication_values["operation_time"] *= speed_multiplier
playsound(target, 'sound/machines/click.ogg', 50, 1)
if(proselytize_values["operation_time"])
if(fabrication_values["operation_time"])
if(!silent)
user.visible_message("<span class='warning'>[user]'s [name] begins tearing apart [target]!</span>", "<span class='brass'>You begin proselytizing [target]...</span>")
if(!do_after(user, proselytize_values["operation_time"], target = target, extra_checks = CALLBACK(src, .proc/proselytize_checks, proselytize_values, target, target_type, user, TRUE)))
var/atom/A = fabrication_values["new_obj_type"]
if(A)
user.visible_message("<span class='warning'>[user]'s [name] starts ripping [target] apart!</span>", \
"<span class='brass'>You start fabricating \a [initial(A.name)] from [target]...</span>")
else
user.visible_message("<span class='warning'>[user]'s [name] starts consuming [target]!</span>", \
"<span class='brass'>Your [name] starts consuming [target]...</span>")
if(!do_after(user, fabrication_values["operation_time"], target = target, extra_checks = CALLBACK(src, .proc/fabricate_checks, fabrication_values, target, target_type, user, TRUE)))
return FALSE
if(!silent)
user.visible_message("<span class='warning'>[user]'s [name] covers [target] in golden energy!</span>", "<span class='brass'>You proselytize [target].</span>")
var/atom/A = fabrication_values["new_obj_type"]
if(A)
user.visible_message("<span class='warning'>[user]'s [name] replaces [target] with \a [initial(A.name)]!</span>", \
"<span class='brass'>You fabricate \a [initial(A.name)] from [target].</span>")
else
user.visible_message("<span class='warning'>[user]'s [name] consumes [target]!</span>", \
"<span class='brass'>Your [name] consumes [target].</span>")
else
if(!silent)
user.visible_message("<span class='warning'>[user]'s [name] tears apart [target], covering it in golden energy!</span>", "<span class='brass'>You proselytize [target].</span>")
var/atom/A = fabrication_values["new_obj_type"]
if(A)
user.visible_message("<span class='warning'>[user]'s [name] rips apart [target], replacing it with \a [initial(A.name)]!</span>", \
"<span class='brass'>You fabricate \a [initial(A.name)] from [target].</span>")
else
user.visible_message("<span class='warning'>[user]'s [name] rapidly consumes [target]!</span>", \
"<span class='brass'>Your [name] consumes [target].</span>")
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
var/new_thing_type = proselytize_values["new_obj_type"]
var/new_thing_type = fabrication_values["new_obj_type"]
if(isturf(target)) //if our target is a turf, we're just going to ChangeTurf it and assume it'll work out.
var/turf/T = target
T.ChangeTurf(new_thing_type)
else
if(new_thing_type)
if(proselytize_values["dir_in_new"])
new new_thing_type(get_turf(target), proselytize_values["spawn_dir"]) //please verify that your new object actually wants to get a dir in New()
if(fabrication_values["dir_in_new"])
new new_thing_type(get_turf(target), fabrication_values["spawn_dir"]) //please verify that your new object actually wants to get a dir in New()
else
var/atom/A = new new_thing_type(get_turf(target))
A.setDir(proselytize_values["spawn_dir"])
if(!proselytize_values["no_target_deletion"]) //for some cases where proselytize_vals() modifies the object but doesn't want it deleted
A.setDir(fabrication_values["spawn_dir"])
if(!fabrication_values["no_target_deletion"]) //for some cases where fabrication_vals() modifies the object but doesn't want it deleted
qdel(target)
modify_stored_power(-proselytize_values["power_cost"])
modify_stored_power(-fabrication_values["power_cost"])
if(no_table_check)
return TRUE
return FALSE
@@ -250,28 +263,34 @@
//What these procs do is they take an existing list of values, which they then modify.
//This(modifying an existing object, in this case the list) is the only way to get information OUT of a do_after callback, which this is used as.
//The proselytize check proc.
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize_checks(list/proselytize_values, atom/target, expected_type, mob/user, silent) //checked constantly while proselytizing
if(!islist(proselytize_values) || QDELETED(target) || QDELETED(user))
//The fabricate check proc.
/obj/item/clockwork/replica_fabricator/proc/fabricate_checks(list/fabrication_values, atom/target, expected_type, mob/user, silent) //checked constantly while fabricating
if(!islist(fabrication_values) || QDELETED(target) || QDELETED(user))
return FALSE
if(repairing || recharging)
return FALSE
if(target.type != expected_type)
return FALSE
if(can_use_power(RATVAR_POWER_CHECK))
proselytize_values["power_cost"] = 0
if(!can_use_power(proselytize_values["power_cost"]))
if(stored_power - proselytize_values["power_cost"] < 0)
fabrication_values["power_cost"] = 0
if(!can_use_power(fabrication_values["power_cost"]))
if(stored_power - fabrication_values["power_cost"] < 0)
if(!silent)
to_chat(user, "<span class='warning'>You need <b>[proselytize_values["power_cost"]]W</b> power to proselytize [target]!</span>")
else if(stored_power - proselytize_values["power_cost"] > max_power)
var/atom/A = fabrication_values["new_obj_type"]
if(A)
to_chat(user, "<span class='warning'>You need <b>[fabrication_values["power_cost"]]W</b> power to fabricate \a [initial(A.name)] from [target]!</span>")
else if(stored_power - fabrication_values["power_cost"] > max_power)
if(!silent)
to_chat(user, "<span class='warning'>Your [name] contains too much power to proselytize [target]!</span>")
var/atom/A = fabrication_values["new_obj_type"]
if(A)
to_chat(user, "<span class='warning'>Your [name] contains too much power to fabricate \a [initial(A.name)] from [target]!</span>")
else
to_chat(user, "<span class='warning'>Your [name] contains too much power to consume [target]!</span>")
return FALSE
return TRUE
//The repair check proc.
/obj/item/clockwork/clockwork_proselytizer/proc/proselytizer_repair_checks(list/repair_values, atom/target, mob/user, silent) //Exists entirely to avoid an otherwise unreadable series of checks.
/obj/item/clockwork/replica_fabricator/proc/fabricator_repair_checks(list/repair_values, atom/target, mob/user, silent) //Exists entirely to avoid an otherwise unreadable series of checks.
if(!islist(repair_values) || QDELETED(target) || QDELETED(user))
return FALSE
if(isliving(target)) //standard checks for if we can affect the target
@@ -302,7 +321,7 @@
return FALSE
if(repair_values["amount_to_heal"] <= 0) //nothing to heal!
return FALSE
repair_values["healing_for_cycle"] = min(repair_values["amount_to_heal"], PROSELYTIZER_REPAIR_PER_TICK) //modify the healing for this cycle
repair_values["healing_for_cycle"] = min(repair_values["amount_to_heal"], FABRICATOR_REPAIR_PER_TICK) //modify the healing for this cycle
repair_values["power_required"] = round(repair_values["healing_for_cycle"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER) //and get the power cost from that
if(!can_use_power(RATVAR_POWER_CHECK) && !can_use_power(repair_values["power_required"]))
if(!silent)
@@ -312,7 +331,7 @@
return TRUE
//The sigil charge check proc.
/obj/item/clockwork/clockwork_proselytizer/proc/sigil_charge_checks(list/charge_values, obj/effect/clockwork/sigil/transmission/sigil, mob/user, silent)
/obj/item/clockwork/replica_fabricator/proc/sigil_charge_checks(list/charge_values, obj/effect/clockwork/sigil/transmission/sigil, mob/user, silent)
if(!islist(charge_values) || QDELETED(sigil) || QDELETED(user))
return FALSE
if(can_use_power(RATVAR_POWER_CHECK))
@@ -120,7 +120,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
if(multiple_invokers_used && !multiple_invokers_optional && !GLOB.ratvar_awakens && !slab.no_cost)
var/nearby_servants = 0
for(var/mob/living/L in range(1, get_turf(invoker)))
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
if(can_recite_scripture(L))
nearby_servants++
if(nearby_servants < invokers_required)
to_chat(invoker, "<span class='warning'>There aren't enough non-mute servants nearby ([nearby_servants]/[invokers_required])!</span>")
@@ -170,7 +170,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
if(!channel_time && invocations.len)
if(multiple_invokers_used)
for(var/mob/living/L in range(1, invoker))
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
if(can_recite_scripture(L))
for(var/invocation in invocations)
clockwork_say(L, text2ratvar(invocation), whispered)
else
@@ -185,7 +185,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
return FALSE
if(multiple_invokers_used)
for(var/mob/living/L in range(1, get_turf(invoker)))
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
if(can_recite_scripture(L))
clockwork_say(L, text2ratvar(invocation), whispered)
else
clockwork_say(invoker, text2ratvar(invocation), whispered)
@@ -53,7 +53,7 @@
/datum/clockwork_scripture/fellowship_armory/run_scripture()
for(var/mob/living/L in orange(1, invoker))
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
if(can_recite_scripture(L))
channel_time = max(channel_time - 10, 0)
return ..()
@@ -214,6 +214,38 @@
quickbind_desc = "Creates an Interdiction Lens, which drains power into nearby Sigils of Transmission."
//Prolonging Prism: Creates a prism that will delay the shuttle at a power cost
/datum/clockwork_scripture/create_object/prolonging_prism
descname = "Powered Structure, Delay Emergency Shuttles"
name = "Prolonging Prism"
desc = "Creates a mechanized prism which will delay the arrival of an emergency shuttle by 2 minutes at a massive power cost."
invocations = list("May this prism...", "...grant us time to enact his will!")
channel_time = 80
consumed_components = list(VANGUARD_COGWHEEL = 5, GEIS_CAPACITOR = 2, REPLICANT_ALLOY = 2)
object_path = /obj/structure/destructible/clockwork/powered/prolonging_prism
creator_message = "<span class='brass'>You form a prolonging prism, which will delay the arrival of an emergency shuttle at a massive power cost.</span>"
observer_message = "<span class='warning'>An onyx prism forms in midair and sprouts tendrils to support itself!</span>"
invokers_required = 2
multiple_invokers_used = TRUE
usage_tip = "The power cost to delay a shuttle increases based on CV and the number of times activated."
tier = SCRIPTURE_APPLICATION
one_per_tile = TRUE
primary_component = VANGUARD_COGWHEEL
sort_priority = 7
quickbind = TRUE
quickbind_desc = "Creates a Prolonging Prism, which will delay the arrival of an emergency shuttle by 2 minutes at a massive power cost."
/datum/clockwork_scripture/create_object/prolonging_prism/check_special_requirements()
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED || SSshuttle.emergency.mode == SHUTTLE_IGNITING || SSshuttle.emergency.mode == SHUTTLE_STRANDED || SSshuttle.emergency.mode == SHUTTLE_ESCAPE)
to_chat(invoker, "<span class='inathneq'>\"It is too late to construct one of these, champion.\"</span>")
return FALSE
var/turf/T = get_turf(invoker)
if(!T || T.z != ZLEVEL_STATION)
to_chat(invoker, "<span class='inathneq'>\"You must be on the station to construct one of these, champion.\"</span>")
return FALSE
return ..()
//Mania Motor: Creates a malevolent transmitter that will broadcast the whispers of Sevtug into the minds of nearby nonservants, causing a variety of mental effects at a power cost.
/datum/clockwork_scripture/create_object/mania_motor
descname = "Powered Structure, Area Denial"
@@ -122,8 +122,8 @@
/datum/clockwork_scripture/ranged_ability/geis_prep/run_scripture()
var/servants = 0
if(!GLOB.ratvar_awakens)
for(var/mob/living/M in GLOB.all_clockwork_mobs)
if(ishuman(M) || issilicon(M))
for(var/mob/living/M in GLOB.living_mob_list)
if(can_recite_scripture(M, TRUE))
servants++
if(servants > SCRIPT_SERVANT_REQ)
whispered = FALSE
@@ -153,8 +153,8 @@
/datum/clockwork_scripture/geis/run_scripture()
var/servants = 0
if(!GLOB.ratvar_awakens)
for(var/mob/living/M in GLOB.all_clockwork_mobs)
if(ishuman(M) || issilicon(M))
for(var/mob/living/M in GLOB.living_mob_list)
if(can_recite_scripture(M, TRUE))
servants++
if(target.buckled)
target.buckled.unbuckle_mob(target, TRUE)
@@ -105,11 +105,11 @@
descname = "Global Structure Buff"
name = "Invoke Nezbere, the Brass Eidolon"
desc = "Taps the limitless power of Nezbere, one of Ratvar's four generals. The restless toil of the Eidolon will empower a wide variety of clockwork apparatus for a full minute - notably, \
clockwork proselytizers will charge very rapidly."
replica fabricators will charge very rapidly."
invocations = list("I call upon you, Armorer!!", "Let your machinations reign on this miserable station!!", "Let your power flow through the tools of your master!!")
channel_time = 150
consumed_components = list(BELLIGERENT_EYE = 6, VANGUARD_COGWHEEL = 6, GEIS_CAPACITOR = 6, REPLICANT_ALLOY = 10)
usage_tip = "Ocular wardens will become empowered, clockwork proselytizers will require no alloy, tinkerer's daemons will produce twice as quickly, \
usage_tip = "Ocular wardens will become empowered, tinkerer's daemons will produce twice as quickly, \
and interdiction lenses, mania motors, tinkerer's daemons, and clockwork obelisks will all require no power."
tier = SCRIPTURE_REVENANT
primary_component = REPLICANT_ALLOY
@@ -33,7 +33,7 @@
/datum/clockwork_scripture/create_object/cogscarab
descname = "Constructor Soul Vessel Shell"
name = "Cogscarab"
desc = "Creates a small shell fitted for soul vessels. Adding an active soul vessel to it results in a small construct with tools and an inbuilt proselytizer."
desc = "Creates a small shell fitted for soul vessels. Adding an active soul vessel to it results in a small construct with tools and an inbuilt fabricator."
invocations = list("Call forth...", "...the workers of Armorer.")
channel_time = 60
consumed_components = list(BELLIGERENT_EYE = 2, HIEROPHANT_ANSIBLE = 1)
@@ -221,24 +221,24 @@
quickbind_desc = "Creates a Soul Vessel, which can be placed in construct shells and cyborg bodies once filled."
//Clockwork Proselytizer: Creates a clockwork proselytizer, used to convert objects and repair clockwork structures.
/datum/clockwork_scripture/create_object/clockwork_proselytizer
descname = "Converts Objects to Ratvarian"
name = "Clockwork Proselytizer"
desc = "Forms a device that, when used on certain objects, converts them into their Ratvarian equivalents. It requires power to function."
//Replica Fabricator: Creates a replica fabricator, used to convert objects and repair clockwork structures.
/datum/clockwork_scripture/create_object/replica_fabricator
descname = "Replaces Objects with Ratvarian Versions"
name = "Replica Fabricator"
desc = "Forms a device that, when used on certain objects, replaces them with their Ratvarian equivalents. It requires power to function."
invocations = list("With this device...", "...his presence shall be made known.")
channel_time = 20
consumed_components = list(GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 2)
whispered = TRUE
object_path = /obj/item/clockwork/clockwork_proselytizer/preloaded
creator_message = "<span class='brass'>You form a clockwork proselytizer.</span>"
usage_tip = "Clockwork Walls cause nearby tinkerer's caches to generate components passively, making them a vital tool. Clockwork Floors heal toxin damage in Servants standing on them."
object_path = /obj/item/clockwork/replica_fabricator/preloaded
creator_message = "<span class='brass'>You form a replica fabricator.</span>"
usage_tip = "Clockwork Walls cause nearby Tinkerer's Caches to generate components passively, making this a vital tool. Clockwork Floors heal toxin damage in Servants standing on them."
tier = SCRIPTURE_SCRIPT
space_allowed = TRUE
primary_component = REPLICANT_ALLOY
sort_priority = 7
quickbind = TRUE
quickbind_desc = "Creates a Clockwork Proselytizer, which can convert various objects to Ratvarian variants."
quickbind_desc = "Creates a Replica Fabricator, which can convert various objects to Ratvarian variants."
//Function Call: Grants the invoker the ability to call forth a Ratvarian spear that deals significant damage to silicons.
@@ -9,7 +9,7 @@
anchored = 1
density = 1
resistance_flags = FIRE_PROOF | ACID_PROOF
var/can_be_repaired = TRUE //if a proselytizer can repair it
var/can_be_repaired = TRUE //if a fabricator can repair it
break_message = "<span class='warning'>The frog isn't a meme after all!</span>" //The message shown when a structure breaks
break_sound = 'sound/magic/clockwork/anima_fragment_death.ogg' //The sound played when a structure breaks
debris = list(/obj/item/clockwork/alloy_shards/large = 1, \
@@ -34,7 +34,7 @@
/obj/structure/destructible/clockwork/shell/cogscarab
name = "cogscarab shell"
desc = "A small brass shell with a cube-shaped receptable in its center. It gives off an aura of obsessive perfectionism."
clockwork_desc = "A dormant receptable that, when powered with a soul vessel, will become a weak construct with an inbuilt proselytizer."
clockwork_desc = "A dormant receptable that, when powered with a soul vessel, will become a weak construct with an inbuilt fabricator."
icon_state = "clockdrone_shell"
mobtype = /mob/living/simple_animal/drone/cogscarab
spawn_message = "'s eyes blink open, glowing bright red."
@@ -0,0 +1,140 @@
//Prolonging Prism: A prism that consumes power to delay the shuttle
/obj/structure/destructible/clockwork/powered/prolonging_prism
name = "prolonging prism"
desc = "A dark onyx prism, held in midair by spiraling tendrils of stone."
clockwork_desc = "A powerful prism that will delay the arrival of an emergency shuttle."
icon_state = "prolonging_prism_inactive"
active_icon = "prolonging_prism"
inactive_icon = "prolonging_prism_inactive"
unanchored_icon = "prolonging_prism_unwrenched"
construction_value = 20
max_integrity = 125
obj_integrity = 125
break_message = "<span class='warning'>The prism falls to the ground with a heavy thud!</span>"
debris = list(/obj/item/clockwork/alloy_shards/small = 3, \
/obj/item/clockwork/alloy_shards/medium = 1, \
/obj/item/clockwork/alloy_shards/large = 1, \
/obj/item/clockwork/component/vanguard_cogwheel/onyx_prism = 1)
var/static/list/component_refund = list(VANGUARD_COGWHEEL = 2, GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 1)
var/static/delay_cost = 2500
var/static/delay_cost_increase = 750
var/static/delay_remaining = 0
/obj/structure/destructible/clockwork/powered/prolonging_prism/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED || SSshuttle.emergency.mode == SHUTTLE_IGNITING || SSshuttle.emergency.mode == SHUTTLE_STRANDED || SSshuttle.emergency.mode == SHUTTLE_ESCAPE)
to_chat(user, "<span class='inathneq'>An emergency shuttle has arrived and this prism is no longer useful; attempt to activate it to gain a partial refund of components used.</span>")
else
var/efficiency = get_efficiency_mod()
var/efficiency_time = get_efficiency_mod(TRUE)
to_chat(user, "<span class='inathneq_small'>It requires at least <b>[get_delay_cost() * efficiency]W</b> of power to attempt to delay the arrival of an emergency shuttle by \
<b>[2 * efficiency_time]</b> minutes.</span>")
to_chat(user, "<span class='inathneq_small'>This cost increases by <b>[delay_cost_increase * 0.1]W</b> for every <b>10 CV</b> and <b>[delay_cost_increase]W</b> for every previous \
activation.</span>")
/obj/structure/destructible/clockwork/powered/prolonging_prism/forced_disable(bad_effects)
if(active)
if(bad_effects)
try_use_power(MIN_CLOCKCULT_POWER*4)
visible_message("<span class='warning'>[src] emits an airy chuckling sound and falls dark!</span>")
toggle()
return TRUE
/obj/structure/destructible/clockwork/powered/prolonging_prism/attack_hand(mob/living/user)
if(user.canUseTopic(src, !issilicon(user), NO_DEXTERY) && is_servant_of_ratvar(user))
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED || SSshuttle.emergency.mode == SHUTTLE_IGNITING || SSshuttle.emergency.mode == SHUTTLE_STRANDED || SSshuttle.emergency.mode == SHUTTLE_ESCAPE)
to_chat(user, "<span class='brass'>You break [src] apart, refunding some of the components used.</span>")
for(var/i in component_refund)
generate_cache_component(i, src)
take_damage(max_integrity)
return 0
if(active)
return 0
var/turf/T = get_turf(src)
if(!T || T.z != ZLEVEL_STATION)
to_chat(user, "<span class='warning'>[src] must be on the station to function!</span>")
return 0
if(SSshuttle.emergency.mode != SHUTTLE_CALL)
to_chat(user, "<span class='warning'>No emergency shuttles are attempting to arrive at the station!</span>")
return 0
var/efficiency = get_efficiency_mod()
if(!try_use_power(get_delay_cost() * efficiency))
to_chat(user, "<span class='warning'>[src] needs more power to function!</span>")
return 0
delay_cost += delay_cost_increase
delay_remaining += PRISM_DELAY_DURATION
toggle(0, user)
/obj/structure/destructible/clockwork/powered/prolonging_prism/process()
var/turf/own_turf = get_turf(src)
if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || own_turf.z != ZLEVEL_STATION)
forced_disable(FALSE)
return
. = ..()
var/delay_amount = 40
delay_remaining -= delay_amount
var/efficiency = get_efficiency_mod()
SSshuttle.emergency.setTimer(SSshuttle.emergency.timeLeft(1) + (delay_amount * efficiency))
var/highest_y
var/highest_x
var/lowest_y
var/lowest_x
var/list/prism_turfs = list()
for(var/t in SSshuttle.emergency.ripple_area(SSshuttle.getDock("emergency_home")))
prism_turfs[t] = TRUE
var/turf/T = t
if(!highest_y || T.y > highest_y)
highest_y = T.y
if(!highest_x || T.x > highest_x)
highest_x = T.x
if(!lowest_y || T.y < lowest_y)
lowest_y = T.y
if(!lowest_x || T.x < lowest_x)
lowest_x = T.x
var/mean_y = Lerp(lowest_y, highest_y)
var/mean_x = Lerp(lowest_x, highest_x)
if(prob(50))
mean_y = Ceiling(mean_y)
else
mean_y = Floor(mean_y)
if(prob(50))
mean_x = Ceiling(mean_x)
else
mean_x = Floor(mean_x)
var/turf/semi_random_center_turf = locate(mean_x, mean_y, ZLEVEL_STATION)
for(var/t in getline(src, semi_random_center_turf))
prism_turfs[t] = TRUE
var/placement_style = prob(50)
for(var/t in prism_turfs)
var/turf/T = t
if(placement_style)
if(IsOdd(T.x + T.y))
seven_random_hexes(T, efficiency)
else if(prob(50 * efficiency))
new /obj/effect/temp_visual/ratvar/prolonging_prism(T)
else
if(IsEven(T.x + T.y))
seven_random_hexes(T, efficiency)
else if(prob(50 * efficiency))
new /obj/effect/temp_visual/ratvar/prolonging_prism(T)
CHECK_TICK //we may be going over a hell of a lot of turfs
/obj/structure/destructible/clockwork/powered/prolonging_prism/proc/get_delay_cost()
return Floor((GLOB.clockwork_construction_value * delay_cost_increase * 0.01) + delay_cost, MIN_CLOCKCULT_POWER)
/obj/structure/destructible/clockwork/powered/prolonging_prism/proc/seven_random_hexes(turf/T, efficiency)
var/static/list/hex_states = list("prismhex1", "prismhex2", "prismhex3", "prismhex4", "prismhex5", "prismhex6", "prismhex7")
var/mutable_appearance/hex_combo
for(var/n in hex_states) //BUILD ME A HEXAGON
if(prob(50 * efficiency))
if(!hex_combo)
hex_combo = mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER)
else
hex_combo.overlays += mutable_appearance('icons/effects/64x64.dmi', n, RIPPLE_LAYER)
if(hex_combo) //YOU BUILT A HEXAGON
hex_combo.pixel_x = -16
hex_combo.pixel_y = -16
hex_combo.mouse_opacity = 0
hex_combo.plane = GAME_PLANE
new /obj/effect/temp_visual/ratvar/prolonging_prism(T, hex_combo)
@@ -14,7 +14,7 @@
light_color = "#BE8700"
var/atom/prey //Whatever Ratvar is chasing
var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE
var/proselytize_range = 10
var/convert_range = 10
dangerous_possession = TRUE
/obj/structure/destructible/clockwork/massive/ratvar/Initialize()
@@ -49,7 +49,7 @@
/obj/structure/destructible/clockwork/massive/ratvar/Bump(atom/A)
var/turf/T = get_turf(A)
if(T == loc)
T = get_step(A, A.dir) //please don't run into a window like a bird, ratvar
T = get_step(T, dir) //please don't run into a window like a bird, ratvar
forceMove(T)
/obj/structure/destructible/clockwork/massive/ratvar/Process_Spacemove()
@@ -58,10 +58,10 @@
/obj/structure/destructible/clockwork/massive/ratvar/process()
if(clashing) //I'm a bit occupied right now, thanks
return
for(var/I in circlerangeturfs(src, proselytize_range))
for(var/I in circlerangeturfs(src, convert_range))
var/turf/T = I
T.ratvar_act()
for(var/I in circleviewturfs(src, round(proselytize_range * 0.5)))
for(var/I in circleviewturfs(src, round(convert_range * 0.5)))
var/turf/T = I
T.ratvar_act(TRUE)
var/dir_to_step_in = pick(GLOB.cardinal)
+9 -3
View File
@@ -53,7 +53,6 @@
/datum/game_mode/cult/pre_setup()
cult_objectives += "sacrifice"
cult_objectives += "eldergod"
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
@@ -102,6 +101,13 @@
GLOB.sac_image = reshape
else
message_admins("Cult Sacrifice: Could not find unconvertable or convertable target. WELP!")
if(!GLOB.summon_spots.len)
while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES)
var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots)
if((summon.z == ZLEVEL_STATION) && summon.valid_territory)
GLOB.summon_spots += summon
cult_objectives += "eldergod"
for(var/datum/mind/cult_mind in cultists_to_cult)
equip_cultist(cult_mind.current)
update_cult_icons_added(cult_mind)
@@ -239,11 +245,11 @@
SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL")
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. <span class='greenannounce'>Success!</span>"
explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)].<span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS")
SSticker.news_report = CULT_SUMMON
else
explanation = "Summon Nar-Sie. <span class='boldannounce'>Fail.</span>"
explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)]<span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_narsie|FAIL")
SSticker.news_report = CULT_FAILURE
+89 -6
View File
@@ -81,17 +81,12 @@
popup.open()
return 1
/mob/living/proc/cult_master()
set category = "Cultist"
set name = "Assert Leadership"
pollCultists(src) // This proc handles the distribution of cult master actions
/datum/action/innate/cult/mastervote
name = "Assert Leadership"
button_icon_state = "cultvote"
/datum/action/innate/cult/mastervote/IsAvailable()
if(GLOB.cult_vote_called)
if(GLOB.cult_vote_called || !ishuman(owner))
return FALSE
return ..()
@@ -300,3 +295,91 @@
B.current.client.images -= GLOB.blood_target_image
QDEL_NULL(GLOB.blood_target_image)
GLOB.blood_target = null
//////// ELDRITCH PULSE /////////
/datum/action/innate/cult/master/pulse
name = "Eldritch Pulse"
desc = "Seize upon a fellow cultist or cult structure and teleport it to a nearby location."
button_icon_state = "arcane_barrage"
var/obj/effect/proc_holder/pulse/PM
var/cooldown = 0
var/base_cooldown = 150
var/throwing = FALSE
var/mob/living/throwee
/datum/action/innate/cult/master/pulse/New()
PM = new()
PM.attached_action = src
..()
/datum/action/innate/cult/master/pulse/IsAvailable()
if(!owner.mind || !owner.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER))
return FALSE
if(cooldown > world.time)
if(!PM.active)
owner << "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can pulse again!</b></span>"
return FALSE
return ..()
/datum/action/innate/cult/master/pulse/Destroy()
QDEL_NULL(PM)
return ..()
/datum/action/innate/cult/master/pulse/Activate()
PM.toggle(owner) //the important bit
return TRUE
/obj/effect/proc_holder/pulse
active = FALSE
ranged_mousepointer = 'icons/effects/throw_target.dmi'
var/datum/action/innate/cult/master/pulse/attached_action
/obj/effect/proc_holder/pulse/Destroy()
QDEL_NULL(attached_action)
return ..()
/obj/effect/proc_holder/pulse/proc/toggle(mob/user)
if(active)
remove_ranged_ability("<span class='cult'>You cease your preparations...</span>")
attached_action.throwing = FALSE
else
add_ranged_ability(user, "<span class='cult'>You prepare to tear through the fabric of reality...</span>")
/obj/effect/proc_holder/pulse/InterceptClickOn(mob/living/caller, params, atom/target)
if(..())
return
if(ranged_ability_user.incapacitated())
remove_ranged_ability()
return
var/turf/T = get_turf(ranged_ability_user)
if(!isturf(T))
return FALSE
if(target in view(7, get_turf(ranged_ability_user)))
if((!(iscultist(target) || istype(target, /obj/structure/destructible/cult)) || target == caller) && !(attached_action.throwing))
return
if(!attached_action.throwing)
attached_action.throwing = TRUE
attached_action.throwee = target
ranged_ability_user << 'sound/weapons/thudswoosh.ogg'
to_chat(ranged_ability_user,"<span class='cult'><b>You reach through the veil with your mind's eye and seize [target]!</b></span>")
return
else
new /obj/effect/temp_visual/cult/sparks(get_turf(attached_action.throwee), ranged_ability_user.dir)
var/distance = get_dist(attached_action.throwee, target)
if(distance >= 16)
return
playsound(target,'sound/magic/exit_blood.ogg')
attached_action.throwee.Beam(target,icon_state="sendbeam",time=4)
attached_action.throwee.forceMove(get_turf(target))
new /obj/effect/temp_visual/cult/sparks(get_turf(target), ranged_ability_user.dir)
attached_action.throwing = FALSE
attached_action.cooldown = world.time + attached_action.base_cooldown
remove_mousepointer(ranged_ability_user.client)
remove_ranged_ability("<span class='cult'>A pulse of blood magic surges through you as you shift [attached_action.throwee] through time and space.</span>")
caller.update_action_buttons_icon()
addtimer(CALLBACK(caller, /mob.proc/update_action_buttons_icon), attached_action.base_cooldown)
+4 -1
View File
@@ -381,7 +381,7 @@
on_damage = 15
slot_flags = null
on = 1
var/charges = 3
var/charges = 5
/obj/item/device/flashlight/flare/culttorch/afterattack(atom/movable/A, mob/user, proximity)
if(!proximity)
@@ -408,6 +408,9 @@
to_chat(user, "<span class='cultitalic'>[cultist_to_receive] is not a follower of the Geometer!</span>")
log_game("Void torch failed - target was deconverted")
return
if(A in user.GetAllContents())
to_chat(user, "<span class='cultitalic'>[A] must be on a surface in order to teleport it!</span>")
return
to_chat(user, "<span class='cultitalic'>You ignite [A] with \the [src], turning it to ash, but through the torch's flames you see that [A] has reached [cultist_to_receive]!")
cultist_to_receive.put_in_hands(A)
charges--
+4 -9
View File
@@ -206,8 +206,8 @@ This file contains the arcane tome files.
if(!SSticker.mode.eldergod)
to_chat(user, "<span class='cultlarge'>\"I am already here. There is no need to try to summon me now.\"</span>")
return
if((loc.z && loc.z != ZLEVEL_STATION) || !A.blob_allowed)
to_chat(user, "<span class='warning'>The Geometer is not interested in lesser locations; the station is the prize!</span>")
if(!(A in GLOB.summon_spots))
to_chat(user, "<span class='cultlarge'>The Geometer can only be summoned where the veil is weak - in [english_list(GLOB.summon_spots)]!</span>")
return
var/confirm_final = alert(user, "This is the FINAL step to summon Nar-Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar-Sie!", "No")
if(confirm_final == "No")
@@ -215,7 +215,8 @@ This file contains the arcane tome files.
return
Turf = get_turf(user)
A = get_area(src)
if(!check_rune_turf(Turf, user) || (loc.z && loc.z != ZLEVEL_STATION)|| !A.blob_allowed)
if(!(A in GLOB.summon_spots)) // Check again to make sure they didn't move
to_chat(user, "<span class='cultlarge'>The Geometer can only be summoned where the veil is weak - in [english_list(GLOB.summon_spots)]!</span>")
return
priority_announce("Figments from an eldritch god are being summoned by [user] into [A.map_name] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg')
for(var/B in spiral_range_turfs(1, user, 1))
@@ -248,8 +249,6 @@ This file contains the arcane tome files.
SSblackbox.add_details("cult_runes_scribed", R.cultist_name)
/obj/item/weapon/tome/proc/check_rune_turf(turf/T, mob/user)
var/area/A = get_area(T)
if(isspaceturf(T))
to_chat(user, "<span class='warning'>You cannot scribe runes in space!</span>")
return FALSE
@@ -262,8 +261,4 @@ This file contains the arcane tome files.
to_chat(user, "<span class='warning'>The veil is not weak enough here.")
return FALSE
if(istype(A, /area/shuttle))
to_chat(user, "<span class='warning'>Interference from hyperspace engines disrupts the Geometer's power on shuttles.</span>")
return FALSE
return TRUE
+2 -2
View File
@@ -446,7 +446,7 @@ structure_check() searches for nearby cultist structures required for the invoca
icon_state = "rune_large"
pixel_x = -32 //So the big ol' 96x96 sprite shows up right
pixel_y = -32
scribe_delay = 450 //how long the rune takes to create
scribe_delay = 500 //how long the rune takes to create
scribe_damage = 40.1 //how much damage you take doing it
var/used = FALSE
@@ -631,7 +631,7 @@ structure_check() searches for nearby cultist structures required for the invoca
/obj/effect/rune/spirit/examine(mob/user)
..()
if(affecting)
to_chat(user, "<span class='cultitalic'>A translucent field encases [user] above the rune!</span>")
to_chat(user, "<span class='cultitalic'>A translucent field encases [affecting] above the rune!</span>")
/obj/effect/rune/spirit/can_invoke(mob/living/user)
if(rune_in_use)
+1 -1
View File
@@ -9,7 +9,7 @@
S.update_icon()
S.power_change()
var/list/skipped_areas = list(/area/engine/engineering, /area/ai_monitored/turret_protected/ai)
var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai)
for(var/area/A in world)
if( !A.requires_power || A.always_unpowered )
File diff suppressed because it is too large Load Diff
+12 -2
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
for(var/n in 1 to 3)
var/datum/mind/boss = pick(antag_candidates)
antag_candidates -= boss
G.bosses += boss
G.bosses[boss] = GANGSTER_BOSS_STARTING_INFLUENCE
boss.gang_datum = G
var/title
if(n == 1)
@@ -85,6 +85,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
sleep(rand(10,100))
for(var/datum/gang/G in gangs)
for(var/datum/mind/boss_mind in G.bosses)
G.bosses[boss_mind] = GANGSTER_BOSS_STARTING_INFLUENCE //Force influence to be put on it.
G.add_gang_hud(boss_mind)
forge_gang_objectives(boss_mind)
greet_gang(boss_mind)
@@ -170,7 +171,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
return 0
if(check && gangster_mind.current.isloyal()) //Check to see if the potential gangster is implanted
return 1
G.gangsters += gangster_mind
G.gangsters[gangster_mind] = GANGSTER_SOLDIER_STARTING_INFLUENCE
gangster_mind.gang_datum = G
if(check)
if(iscarbon(gangster_mind.current))
@@ -209,15 +210,24 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
if(!G.is_deconvertible && !remove_bosses)
return 0
if(gangster_mind in G.gangsters)
G.reclaim_points(G.gangsters[gangster_mind])
G.gangsters -= gangster_mind
removed = 1
if(remove_bosses && (gangster_mind in G.bosses))
G.reclaim_points(G.bosses[gangster_mind])
G.bosses -= gangster_mind
removed = 1
if(G.tags_by_mind[gangster_mind] && islist(G.tags_by_mind[gangster_mind]))
var/list/tags_cache = G.tags_by_mind[gangster_mind]
for(var/v in tags_cache)
var/obj/effect/decal/cleanable/crayon/gang/c = v
c.set_mind_owner(null)
G.tags_by_mind -= gangster_mind
if(!removed)
return 0
gangster_mind.special_role = null
gangster_mind.gang_datum = null
+86 -42
View File
@@ -8,6 +8,7 @@
var/list/datum/mind/gangsters = list() //gang B Members
var/list/datum/mind/bosses = list() //gang A Bosses
var/list/obj/item/device/gangtool/gangtools = list()
var/list/tags_by_mind = list() //Assoc list in format of tags_by_mind[mind_of_gangster] = list(tag1, tag2, tag3) where tags are the actual object decals.
var/style
var/fighting_style = "normal"
var/list/territory = list()
@@ -202,9 +203,9 @@
return
var/added_names = ""
var/lost_names = ""
SSticker.mode.shuttle_check() // See if its time to start wrapping things up
//Re-add territories that were reclaimed, so if they got tagged over, they can still earn income if they tag it back before the next status report
var/list/reclaimed_territories = territory_new & territory_lost
territory |= reclaimed_territories
@@ -245,47 +246,90 @@
set_domination_time(new_time)
message += "<b>[seconds_remaining] seconds remain</b> in hostile takeover.<BR>"
else
for(var/obj/item/device/gangtool/G in gangtools)
var/pmessage = message
var/points_new = 0
if(istype(G, /obj/item/device/gangtool/soldier))
points_new = max(0,round(3 - G.points/10)) + (sbonus) + (LAZYLEN(G.tags)/2) // Soldier points
pmessage += "Your influence has increased by [round(sbonus)] from your gang holding [LAZYLEN(territory)] territories, and a bonus of [round(LAZYLEN(G.tags)/2)] for territories you have personally marked and kept intact.<BR>"
else
points_new = max(0,round(5 - G.points/10)) + LAZYLEN(territory) // Boss points, more focused on big picture
pmessage += "Your influence has increased by [round(points_new)] from your gang holding [territory.len] territories<BR>"
G.points += points_new
var/mob/living/carbon/human/ganger = get(G.loc, /mob/living)
var/points_newer = 0
var/static/inner = inner_outfit
var/static/outer = outer_outfit
if(ishuman(ganger) && ganger.mind in (gangsters|bosses))
for(var/obj/C in ganger.contents)
if(C.type == inner_outfit)
points_newer += 2
continue
if(C.type == outer_outfit)
points_newer += 2
continue
switch(C.type)
if(/obj/item/clothing/neck/necklace/dope)
points_newer += 2
if(/obj/item/clothing/head/collectable/petehat/gang)
points_newer += 4
if(/obj/item/clothing/shoes/gang)
points_newer += 6
if(/obj/item/clothing/mask/gskull)
points_newer += 5
if(/obj/item/clothing/gloves/gang)
points_newer += 3
if(/obj/item/weapon/storage/belt/military/gang)
points_newer += 4
if(points_newer)
G.points += points_newer
pmessage += "Your influential choice of clothing has further increased your influence by [points_newer] points.<BR>"
pmessage += "You now have <b>[G.points] influence</b>.<BR>"
to_chat(ganger, "<span class='notice'>[bicon(G)] [pmessage]</span>")
pay_territory_income_to_bosses()
pay_territory_income_to_soldiers(sbonus)
pay_all_clothing_bonuses()
announce_all_influence()
/datum/gang/proc/pay_all_clothing_bonuses()
for(var/datum/mind/mind in gangsters|bosses)
pay_clothing_bonus(mind)
/datum/gang/proc/pay_clothing_bonus(var/datum/mind/gangsta)
var/mob/living/carbon/human/gangbanger = gangsta.current
. = 0
if(!istype(gangbanger) || gangbanger.stat == DEAD) //Dead gangsters aren't influential at all!
return 0
var/static/inner = inner_outfit
var/static/outer = outer_outfit
for(var/obj/item/C in gangbanger.contents)
if(C.type == inner_outfit)
. += 2
continue
else if(C.type == outer_outfit)
. += 2
continue
. += C.gang_contraband_value()
adjust_influence(gangsta, .)
if(.)
announce_to_mind(gangsta, "<span class='notice'>Your influential choice of clothing has increased your influence by [.] points!</span>")
else
announce_to_mind(gangsta, "<span class='warning'>Unfortunately, you have not gained any additional influence from your drab, old, boring clothing. Learn to dress like a gangsta, bro!</span>") //Kek
/datum/gang/proc/pay_soldier_territory_income(datum/mind/soldier, sbonus = 0)
. = 0
. = max(0,round(3 - gangsters[soldier]/10)) + (sbonus) + (get_soldier_territories(soldier)/2)
adjust_influence(soldier, .)
/datum/gang/proc/get_soldier_territories(datum/mind/soldier)
if(!islist(tags_by_mind[soldier])) //They have no tagged territories!
return 0
var/list/tags = tags_by_mind[soldier]
return tags.len
/datum/gang/proc/pay_territory_income_to_soldiers(sbonus = 0)
for(var/datum/mind/soldier in gangsters)
var/returned = pay_soldier_territory_income(soldier)
if(!returned)
announce_to_mind(soldier, "<span class='warning'>You have not gained any influence from territories you personally tagged. Get to work, soldier!</span>")
else
announce_to_mind(soldier, "<span class='notice'>You have gained [returned] influence from [get_soldier_territories(soldier)] territories you have personally tagged.</span>")
/datum/gang/proc/announce_all_influence()
for(var/datum/mind/MG in bosses|gangsters)
announce_total_influence(MG)
/datum/gang/proc/pay_territory_income_to_bosses()
. = 0
for(var/datum/mind/boss_mind in bosses)
var/inc = max(0,round(5 - bosses[boss_mind]/10)) + LAZYLEN(territory)
. += inc
adjust_influence(boss_mind, inc)
announce_to_mind(boss_mind, "<span class='boldnotice'>Your influence has increased by [inc] from your gang holding [LAZYLEN(territory)] territories!</span>")
/datum/gang/proc/get_influence(datum/mind/gangster_mind)
if(gangster_mind in gangsters)
return gangsters[gangster_mind]
if(gangster_mind in bosses)
return bosses[gangster_mind]
/datum/gang/proc/adjust_influence(datum/mind/gangster_mind, amount)
if(gangster_mind in gangsters)
gangsters[gangster_mind] += amount
if(gangster_mind in bosses)
bosses[gangster_mind] += amount
/datum/gang/proc/announce_to_mind(datum/mind/gangster_mind, message)
if(gangster_mind.current && gangster_mind.current.stat != DEAD)
to_chat(gangster_mind.current, message)
/datum/gang/proc/announce_total_influence(datum/mind/gangster_mind)
announce_to_mind(gangster_mind, "<span class='boldnotice'>[name] Gang: You now have a total of [get_influence(gangster_mind)] influence!</span>")
/datum/gang/proc/reclaim_points(amount)
for(var/datum/mind/bawss in bosses)
adjust_influence(bawss, amount/bosses.len)
announce_to_mind(bawss, "<span class='notice'>[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.</span>")
//Multiverse
+17 -5
View File
@@ -11,7 +11,7 @@
if(check_canbuy && !can_buy(user, gang, gangtool))
return FALSE
var/real_cost = get_cost(user, gang, gangtool)
gangtool.points -= real_cost
gang.adjust_influence(user.mind, -real_cost)
spawn_item(user, gang, gangtool)
return TRUE
@@ -23,7 +23,7 @@
to_chat(user, spawn_msg)
/datum/gang_item/proc/can_buy(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return gang && (gangtool.points >= get_cost(user, gang, gangtool)) && can_see(user, gang, gangtool)
return gang && (gang.get_influence(user.mind) >= get_cost(user, gang, gangtool)) && can_see(user, gang, gangtool)
/datum/gang_item/proc/can_see(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return TRUE
@@ -118,6 +118,9 @@
name = "pimpin' hat"
desc = "The undisputed king of style."
/obj/item/clothing/head/collectable/petehat/gang/gang_contraband_value()
return 4
/datum/gang_item/clothing/mask
name = "Golden Death Mask"
id = "mask"
@@ -129,6 +132,8 @@
icon_state = "gskull"
desc = "Strike terror, and envy, into the hearts of your enemies."
/obj/item/clothing/mask/gskull/gang_contraband_value()
return 5
/datum/gang_item/clothing/shoes
name = "Bling Boots"
@@ -141,13 +146,15 @@
desc = "Stand aside peasants."
icon_state = "bling"
/obj/item/clothing/shoes/gang/gang_contraband_value()
return 6
/datum/gang_item/clothing/neck
name = "Gold Necklace"
id = "necklace"
cost = 9
item_path = /obj/item/clothing/neck/necklace/dope
/datum/gang_item/clothing/hands
name = "Decorative Brass Knuckles"
id = "hand"
@@ -160,6 +167,9 @@
icon_state = "knuckles"
w_class = 3
/obj/item/clothing/gloves/gang/gang_contraband_value()
return 3
/datum/gang_item/clothing/belt
name = "Badass Belt"
id = "belt"
@@ -173,7 +183,8 @@
desc = "The belt buckle simply reads 'BAMF'."
storage_slots = 1
/obj/item/weapon/storage/belt/military/gang/gang_contraband_value()
return 4
///////////////////
//WEAPONS
@@ -215,6 +226,7 @@
name = "Sawn-Off Improvised Shotgun"
id = "sawn"
cost = 6
item_path = /obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/sawn
/datum/gang_item/weapon/ammo/improvised_ammo
name = "Box of Buckshot"
@@ -238,7 +250,7 @@
name = "Black Market .50cal Sniper Rifle"
id = "sniper"
cost = 40
item_path = /obj/item/weapon/gun/ballistic/automatic/sniper_rifle
item_path = /obj/item/weapon/gun/ballistic/automatic/sniper_rifle/gang
/datum/gang_item/weapon/ammo/sniper_ammo
name = "Smuggled .50cal Sniper Rounds"
+4 -7
View File
@@ -15,7 +15,6 @@
var/outfits = 2
var/free_pen = 0
var/promotable = 0
var/points = 15
var/list/tags = list()
/obj/item/device/gangtool/Initialize() //Initialize supply point income if it hasn't already been started
@@ -50,7 +49,7 @@
var/isboss = (user.mind == gang.bosses[1])
dat += "Registration: <B>[gang.name] Gang [isboss ? "Boss" : "Lieutenant"]</B><br>"
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
dat += "Your Influence: <B>[points]</B><br>"
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
dat += "Time until Influence grows: <B>[time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss")]</B><br>"
dat += "<hr>"
@@ -147,8 +146,9 @@
gang.gangtools += src
icon_state = "gangtool-[gang.color]"
if(!(user.mind in gang.bosses))
var/cached_influence = gang.gangsters[user.mind]
SSticker.mode.remove_gangster(user.mind, 0, 2)
gang.bosses += user.mind
gang.bosses[user.mind] = cached_influence
user.mind.gang_datum = gang
user.mind.special_role = "[gang.name] Gang Lieutenant"
gang.add_gang_hud(user.mind)
@@ -246,9 +246,6 @@
///////////// Internal tool used by gang regulars ///////////
/obj/item/device/gangtool/soldier
points = 5
/obj/item/device/gangtool/soldier/New(mob/user)
. = ..()
gang = user.mind.gang_datum
@@ -264,7 +261,7 @@
dat += "<center><font color='red'>Takeover In Progress:<br><B>[gang.domination_time_remaining()] seconds remain</B></font></center>"
dat += "Registration: <B>[gang.name] - Foot Soldier</B><br>"
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
dat += "Your Influence: <B>[points]</B><br>"
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
if(LAZYLEN(tags))
dat += "Your tags generate bonus influence for you.<br> You have tagged the following territories:"
for(var/obj/effect/decal/cleanable/crayon/gang/T in tags)
+25 -22
View File
@@ -1,3 +1,4 @@
#define DEFAULT_DOOMSDAY_TIMER 4500
/datum/AI_Module
var/uses = 0
var/module_name
@@ -37,12 +38,13 @@
to_chat(src, "<span class='notice'>Doomsday device armed.</span>")
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
set_security_level("delta")
nuking = 1
var/obj/machinery/doomsday_device/DOOM = new /obj/machinery/doomsday_device(src)
nuking = TRUE
var/obj/machinery/doomsday_device/DOOM = new (src)
doomsday_device = DOOM
doomsday_device.start()
verbs -= /mob/living/silicon/ai/proc/nuke_station
for(var/obj/item/weapon/pinpointer/P in GLOB.pinpointer_list)
for(var/pinpointer in GLOB.pinpointer_list)
var/obj/item/weapon/pinpointer/P = pinpointer
P.switch_mode_to(TRACK_MALF_AI) //Pinpointers start tracking the AI wherever it goes
/obj/machinery/doomsday_device
@@ -50,34 +52,32 @@
name = "doomsday device"
icon_state = "nuclearbomb_base"
desc = "A weapon which disintegrates all organic life in a large area."
anchored = 1
density = 1
anchored = TRUE
density = TRUE
verb_exclaim = "blares"
var/timing = FALSE
var/default_timer = 4500
var/obj/effect/countdown/doomsday/countdown
var/detonation_timer
var/list/milestones = list()
var/list/milestones
/obj/machinery/doomsday_device/New()
..()
/obj/machinery/doomsday_device/Initialize()
. = ..()
countdown = new(src)
milestones = list()
/obj/machinery/doomsday_device/Destroy()
if(countdown)
qdel(countdown)
countdown = null
QDEL_NULL(countdown)
STOP_PROCESSING(SSfastprocess, src)
SSshuttle.clearHostileEnvironment(src)
SSmapping.remove_nuke_threat(src)
for(var/A in GLOB.ai_list)
var/mob/living/silicon/ai/Mlf = A
if(Mlf.doomsday_device == src)
Mlf.doomsday_device = null
. = ..()
var/mob/living/silicon/ai/AI = A
if(AI.doomsday_device == src)
AI.doomsday_device = null
return ..()
/obj/machinery/doomsday_device/proc/start()
detonation_timer = world.time + default_timer
detonation_timer = world.time + DEFAULT_DOOMSDAY_TIMER
timing = TRUE
countdown.start()
START_PROCESSING(SSfastprocess, src)
@@ -90,24 +90,24 @@
/obj/machinery/doomsday_device/process()
var/turf/T = get_turf(src)
if(!T || T.z != ZLEVEL_STATION)
minor_announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 1)
minor_announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
SSshuttle.clearHostileEnvironment(src)
qdel(src)
return
if(!timing)
STOP_PROCESSING(SSfastprocess, src)
return
var/sec_left = seconds_remaining()
if(sec_left <= 0)
if(!sec_left)
timing = FALSE
detonate(T.z)
else
var/key = num2text(sec_left)
if(!(sec_left % 60) && !(key in milestones))
milestones[key] = TRUE
var/message = "[key] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!"
minor_announce(message, "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 1)
minor_announce("[key] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
/obj/machinery/doomsday_device/proc/detonate(z_level = 1)
/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION)
for(var/mob/M in GLOB.player_list)
M << 'sound/machines/Alarm.ogg'
sleep(100)
@@ -604,3 +604,6 @@
eyeobj.relay_speech = TRUE
to_chat(src, "<span class='notice'>OTA firmware distribution complete! Cameras upgraded: Enhanced surveillance package online.</span>")
verbs -= /mob/living/silicon/ai/proc/surveillance
#undef DEFAULT_DOOMSDAY_TIMER
@@ -2,7 +2,6 @@
name = "Human Observation Console"
var/team = 0
networks = list("SS13","Abductor")
off_action = new/datum/action/innate/camera_off/abductor //specific datum
var/datum/action/innate/teleport_in/tele_in_action = new
var/datum/action/innate/teleport_out/tele_out_action = new
var/datum/action/innate/teleport_self/tele_self_action = new
@@ -23,29 +22,37 @@
eyeobj.icon_state = "camera_target"
/obj/machinery/computer/camera_advanced/abductor/GrantActions(mob/living/carbon/user)
off_action.target = user
off_action.Grant(user)
..()
jump_action.target = user
jump_action.Grant(user)
//TODO : add null checks
tele_in_action.target = console.pad
tele_in_action.Grant(user)
if(tele_in_action)
tele_in_action.target = console.pad
tele_in_action.Grant(user)
actions += tele_in_action
tele_out_action.target = console
tele_out_action.Grant(user)
if(tele_out_action)
tele_out_action.target = console
tele_out_action.Grant(user)
actions += tele_out_action
tele_self_action.target = console.pad
tele_self_action.Grant(user)
if(tele_self_action)
tele_self_action.target = console.pad
tele_self_action.Grant(user)
actions += tele_self_action
vest_mode_action.target = console
vest_mode_action.Grant(user)
if(vest_mode_action)
vest_mode_action.target = console
vest_mode_action.Grant(user)
actions += vest_mode_action
vest_disguise_action.target = console
vest_disguise_action.Grant(user)
if(vest_disguise_action)
vest_disguise_action.target = console
vest_disguise_action.Grant(user)
actions += vest_disguise_action
set_droppoint_action.target = console
set_droppoint_action.Grant(user)
if(set_droppoint_action)
set_droppoint_action.target = console
set_droppoint_action.Grant(user)
actions += set_droppoint_action
/obj/machinery/computer/camera_advanced/abductor/proc/IsScientist(mob/living/carbon/human/H)
var/datum/species/abductor/S = H.dna.species
@@ -56,30 +63,6 @@
return
return ..()
/datum/action/innate/camera_off/abductor/Activate()
if(!target || !iscarbon(target))
return
var/mob/living/carbon/C = target
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/obj/machinery/computer/camera_advanced/abductor/origin = remote_eye.origin
origin.current_user = null
origin.jump_action.Remove(C)
origin.tele_in_action.Remove(C)
origin.tele_out_action.Remove(C)
origin.tele_self_action.Remove(C)
origin.vest_mode_action.Remove(C)
origin.vest_disguise_action.Remove(C)
origin.set_droppoint_action.Remove(C)
C.reset_perspective(null)
if(C.client)
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
chunk.remove(remote_eye)
remote_eye.eye_user = null
C.remote_control = null
C.unset_machine()
Remove(C)
/datum/action/innate/teleport_in
name = "Send To"
button_icon_state = "beam_down"
+1 -1
View File
@@ -43,7 +43,7 @@
/datum/objective_item/steal/capmedal
name = "the medal of captaincy"
targetitem = /obj/item/clothing/tie/medal/gold/captain
targetitem = /obj/item/clothing/accessory/medal/gold/captain
difficulty = 5
excludefromjob = list("Captain")
+1 -1
View File
@@ -243,7 +243,7 @@
if(!is_gangster(user))
var/datum/gang/multiverse/G = new(src, "[user.real_name]")
SSticker.mode.gangs += G
G.bosses += user.mind
G.bosses[user.mind] = 0
G.add_gang_hud(user.mind)
user.mind.gang_datum = G
to_chat(user, "<span class='warning'><B>With your new found power you could easily conquer the station!</B></span>")
+1 -2
View File
@@ -106,10 +106,9 @@
name = "Fireball"
spell_type = /obj/effect/proc_holder/spell/aimed/fireball
/*
/datum/spellbook_entry/rod_form
name = "Rod Form"
spell_type = /obj/effect/proc_holder/spell/targeted/rod_form */
spell_type = /obj/effect/proc_holder/spell/targeted/rod_form
/datum/spellbook_entry/magicm
name = "Magic Missile"
+26 -89
View File
@@ -1,56 +1,35 @@
/obj/machinery/ai_slipper
name = "\improper AI liquid dispenser"
name = "foam dispenser"
desc = "A remotely-activatable dispenser for crowd-controlling foam."
icon = 'icons/obj/device.dmi'
icon_state = "ai-slipper0"
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
anchored = 1
anchored = TRUE
obj_integrity = 200
max_integrity = 200
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
var/uses = 20
var/disabled = 1
var/lethal = 0
var/locked = 1
var/cooldown_time = 0
var/cooldown_timeleft = 0
var/cooldown_on = 0
var/cooldown = 0
var/cooldown_time = 100
req_access = list(GLOB.access_ai_upload)
/obj/machinery/ai_slipper/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>")
/obj/machinery/ai_slipper/power_change()
if(stat & BROKEN)
return
else
if( powered() )
if(powered())
stat &= ~NOPOWER
else
icon_state = "ai-slipper0"
stat |= NOPOWER
/obj/machinery/ai_slipper/proc/setState(enabled, uses)
src.disabled = disabled
src.uses = uses
src.power_change()
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user, params)
if(stat & (NOPOWER|BROKEN))
return
if (issilicon(user))
return src.attack_hand(user)
else // trying to unlock the interface
if (src.allowed(user))
locked = !locked
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] the device.</span>")
if (locked)
if (user.machine==src)
user.unset_machine()
user << browse(null, "window=ai_slipper")
else
if (user.machine==src)
src.attack_hand(user)
if((stat & (NOPOWER|BROKEN)) || cooldown_time > world.time || !uses)
icon_state = "ai-slipper0"
else
to_chat(user, "<span class='danger'>Access denied.</span>")
icon_state = "ai-slipper1"
/obj/machinery/ai_slipper/attack_ai(mob/user)
return attack_hand(user)
@@ -58,60 +37,18 @@
/obj/machinery/ai_slipper/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return
if ( (get_dist(src, user) > 1 ))
if (!(issilicon(user) || IsAdminGhost(user)))
to_chat(user, text("Too far away."))
user.unset_machine()
user << browse(null, "window=ai_slipper")
return
user.set_machine(src)
var/area/A = get_area(src)
var/t = "<TT><B>AI Liquid Dispenser</B> ([format_text(A.name)])<HR>"
if(locked && (!(issilicon(user) || IsAdminGhost(user))))
t += "<I>(Swipe ID card to unlock control panel.)</I><BR>"
else
t += "Dispenser [disabled?"deactivated":"activated"] - <A href='?src=\ref[src];toggleOn=1'>[disabled?"Enable":"Disable"]?</a><br>\n"
t += "Uses Left: [uses]. <A href='?src=\ref[src];toggleUse=1'>Activate the dispenser?</A><br>\n"
user << browse(t, "window=computer;size=575x450")
onclose(user, "computer")
/obj/machinery/ai_slipper/Topic(href, href_list)
if(..())
if(!allowed(user))
to_chat(user, "<span class='danger'>Access denied.</span>")
return
if (src.locked)
if(!(issilicon(usr)|| IsAdminGhost(usr)))
to_chat(usr, "Control panel is locked!")
return
if (href_list["toggleOn"])
src.disabled = !src.disabled
icon_state = src.disabled? "ai-slipper0":"ai-slipper1"
if (href_list["toggleUse"])
if(cooldown_on || disabled)
return
else
new /obj/effect/particle_effect/foam(loc)
src.uses--
cooldown_on = 1
cooldown_time = world.timeofday + 100
slip_process()
return
src.attack_hand(usr)
/obj/machinery/ai_slipper/proc/slip_process()
while(cooldown_time - world.timeofday > 0)
var/ticksleft = cooldown_time - world.timeofday
if(ticksleft > 1e5)
cooldown_time = world.timeofday + 10 // midnight rollover
cooldown_timeleft = (ticksleft / 10)
sleep(5)
if (uses <= 0)
if(!uses)
to_chat(user, "<span class='danger'>[src] is out of foam and cannot be activated.</span>")
return
if(cooldown_time > world.time)
to_chat(user, "<span class='danger'>[src] cannot be activated for another <b>[round((world.time - cooldown_time) * 0.1)]</b> second\s.</span>")
return
if (uses >= 0)
cooldown_on = 0
src.power_change()
new /obj/effect/particle_effect/foam(loc)
uses--
to_chat(user, "<span class='notice'>You activate [src]. It now has <b>[uses]</b> uses of foam remaining.</span>")
cooldown = world.time + cooldown_time
power_change()
addtimer(CALLBACK(src, .proc/power_change), cooldown_time)
+2 -1
View File
@@ -159,9 +159,10 @@
else if(istype(W, /obj/item/stack/sheet/mineral/plasma))
if(!isEmpProof())
var/obj/item/stack/sheet/mineral/plasma/P = W
upgradeEmpProof()
to_chat(user, "[msg]")
qdel(W)
P.use(1)
else
to_chat(user, "[msg2]")
return
+1 -1
View File
@@ -71,7 +71,7 @@
/obj/machinery/cell_charger/proc/removecell()
charging.updateicon()
charging.update_icon()
charging = null
chargelevel = -1
updateicon()
+1 -1
View File
@@ -523,7 +523,7 @@
to_chat(M, "<span class='warning'>An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.</span>")
M.Stun(5)
sleep(30)
M.vomit(50)
M.vomit(10, distance = 5)
if(ORION_TRAIL_FLUX)
if(prob(75))
M.Weaken(3)
+40 -21
View File
@@ -9,6 +9,7 @@
var/list/networks = list("SS13")
var/datum/action/innate/camera_off/off_action = new
var/datum/action/innate/camera_jump/jump_action = new
var/list/actions = list()
light_color = LIGHT_COLOR_RED
@@ -17,10 +18,31 @@
eyeobj.origin = src
/obj/machinery/computer/camera_advanced/proc/GrantActions(mob/living/user)
off_action.target = user
off_action.Grant(user)
jump_action.target = user
jump_action.Grant(user)
if(off_action)
off_action.target = user
off_action.Grant(user)
actions += off_action
if(jump_action)
jump_action.target = user
jump_action.Grant(user)
actions += jump_action
/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user)
if(!user)
return
for(var/V in actions)
var/datum/action/A = V
A.Remove(user)
if(user.client)
user.reset_perspective(null)
eyeobj.RemoveImages()
eyeobj.eye_user = null
user.remote_control = null
current_user = null
user.unset_machine()
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
@@ -35,7 +57,7 @@
/obj/machinery/computer/camera_advanced/on_unset_machine(mob/M)
if(M == current_user)
off_action.Activate()
remove_eye_control(M)
/obj/machinery/computer/camera_advanced/attack_hand(mob/user)
if(current_user)
@@ -69,7 +91,7 @@
/obj/machinery/computer/camera_advanced/attack_robot(mob/user)
return attack_hand(user)
obj/machinery/computer/camera_advanced/attack_ai(mob/user)
/obj/machinery/computer/camera_advanced/attack_ai(mob/user)
return //AIs would need to disable their own camera procs to use the console safely. Bugs happen otherwise.
@@ -92,13 +114,20 @@ obj/machinery/computer/camera_advanced/attack_ai(mob/user)
var/eye_initialized = 0
var/visible_icon = 0
var/image/user_image = null
/mob/camera/aiEye/remote/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
user.sight = 0
user.see_in_dark = 2
return 1
/mob/camera/aiEye/remote/RemoveImages()
..()
if(visible_icon)
var/client/C = GetViewerClient()
if(C)
C.images -= user_image
/mob/camera/aiEye/remote/Destroy()
eye_user = null
origin = null
@@ -115,7 +144,8 @@ obj/machinery/computer/camera_advanced/attack_ai(mob/user)
return
T = get_turf(T)
loc = T
GLOB.cameranet.visibility(src)
if(use_static)
GLOB.cameranet.visibility(src)
if(visible_icon)
if(eye_user.client)
eye_user.client.images -= user_image
@@ -149,19 +179,8 @@ obj/machinery/computer/camera_advanced/attack_ai(mob/user)
return
var/mob/living/C = target
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
remote_eye.origin.current_user = null
remote_eye.origin.jump_action.Remove(C)
if(C.client)
C.reset_perspective(null)
if(remote_eye.visible_icon)
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
chunk.remove(remote_eye)
remote_eye.eye_user = null
C.remote_control = null
C.unset_machine()
Remove(C)
playsound(remote_eye.origin, 'sound/machines/terminal_off.ogg', 25, 0)
var/obj/machinery/computer/camera_advanced/console = remote_eye.origin
console.remove_eye_control(target)
/datum/action/innate/camera_jump
name = "Jump To Camera"
+1 -1
View File
@@ -1,7 +1,7 @@
// The communications computer
/obj/machinery/computer/communications
name = "communications console"
desc = "This can be used for various important functions. Still under developement."
desc = "A console used for high-priority announcements and emergencies."
icon_screen = "comm"
icon_keyboard = "tech_key"
req_access = list(GLOB.access_heads)
+5 -5
View File
@@ -332,7 +332,7 @@
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if(active2)
var/t1 = stripped_multiline_input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null)
var/t1 = stripped_input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["mi_dis_d"] = t1
@@ -344,7 +344,7 @@
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if(active2)
var/t1 = stripped_multiline_input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null)
var/t1 = stripped_input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["ma_dis_d"] = t1
@@ -356,7 +356,7 @@
src.active2.fields["alg"] = t1
if("alg_d")
if(active2)
var/t1 = stripped_multiline_input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null)
var/t1 = stripped_input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["alg_d"] = t1
@@ -368,13 +368,13 @@
src.active2.fields["cdi"] = t1
if("cdi_d")
if(active2)
var/t1 = stripped_multiline_input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null)
var/t1 = stripped_input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if(active2)
var/t1 = stripped_multiline_input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null)
var/t1 = stripped_input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["notes"] = t1
+10 -2
View File
@@ -23,6 +23,14 @@
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/secure_data/laptop
name = "security laptop"
desc = "A cheap Nanotrasen security laptop, it functions as a security records console. It's bolted to the table."
icon_state = "laptop"
icon_screen = "seclaptop"
icon_keyboard = "laptop_key"
clockwork = TRUE //it'd look weird
/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/card/id))
if(!scan)
@@ -620,7 +628,7 @@ What a mess.*/
if("mi_crim_add")
if(istype(active1, /datum/data/record))
var/t1 = stripped_input(usr, "Please input minor crime names:", "Secure. records", "", null)
var/t2 = stripped_multiline_input(usr, "Please input minor crime details:", "Secure. records", "", null)
var/t2 = stripped_input(usr, "Please input minor crime details:", "Secure. records", "", null)
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
@@ -634,7 +642,7 @@ What a mess.*/
if("ma_crim_add")
if(istype(active1, /datum/data/record))
var/t1 = stripped_input(usr, "Please input major crime names:", "Secure. records", "", null)
var/t2 = stripped_multiline_input(usr, "Please input major crime details:", "Secure. records", "", null)
var/t2 = stripped_input(usr, "Please input major crime details:", "Secure. records", "", null)
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
+53
View File
@@ -72,6 +72,7 @@
var/hasShocked = 0 //Prevents multiple shocks from happening
autoclose = 1
var/obj/item/device/doorCharge/charge = null //If applied, causes an explosion upon opening the door
var/obj/item/weapon/note //Any papers pinned to the airlock
var/detonated = 0
var/doorOpen = 'sound/machines/airlock.ogg'
var/doorClose = 'sound/machines/AirlockClose.ogg'
@@ -82,6 +83,7 @@
var/airlock_material = null //material of inner filling; if its an airlock with glass, this should be set to "glass"
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
var/note_overlay_file = 'icons/obj/doors/airlocks/station/overlays.dmi' //Used for papers and photos pinned to the airlock
var/cyclelinkeddir = 0
var/obj/machinery/door/airlock/cyclelinkedairlock
@@ -213,8 +215,14 @@
if(id_tag)
for(var/obj/machinery/doorButtons/D in GLOB.machines)
D.removeMe(src)
qdel(note)
return ..()
/obj/machinery/door/airlock/handle_atom_del(atom/A)
if(A == note)
note = null
update_icon()
/obj/machinery/door/airlock/bumpopen(mob/living/user) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite
if(!issilicon(usr))
if(src.isElectrified())
@@ -369,6 +377,8 @@
var/mutable_appearance/weld_overlay
var/mutable_appearance/damag_overlay
var/mutable_appearance/sparks_overlay
var/mutable_appearance/note_overlay
var/notetype = note_type()
switch(state)
if(AIRLOCK_CLOSED)
@@ -393,6 +403,8 @@
lights_overlay = get_airlock_overlay("lights_bolts", overlays_file)
else if(emergency)
lights_overlay = get_airlock_overlay("lights_emergency", overlays_file)
if(note)
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
if(AIRLOCK_DENY)
if(!hasPower())
@@ -414,6 +426,8 @@
if(welded)
weld_overlay = get_airlock_overlay("welded", overlays_file)
lights_overlay = get_airlock_overlay("lights_denied", overlays_file)
if(note)
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
if(AIRLOCK_EMAG)
frame_overlay = get_airlock_overlay("closed", icon)
@@ -433,6 +447,8 @@
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
if(welded)
weld_overlay = get_airlock_overlay("welded", overlays_file)
if(note)
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
if(AIRLOCK_CLOSING)
frame_overlay = get_airlock_overlay("closing", icon)
@@ -447,6 +463,8 @@
panel_overlay = get_airlock_overlay("panel_closing_protected", overlays_file)
else
panel_overlay = get_airlock_overlay("panel_closing", overlays_file)
if(note)
note_overlay = get_airlock_overlay("[notetype]_closing", note_overlay_file)
if(AIRLOCK_OPEN)
frame_overlay = get_airlock_overlay("open", icon)
@@ -461,6 +479,8 @@
panel_overlay = get_airlock_overlay("panel_open", overlays_file)
if(obj_integrity < (0.75 * max_integrity))
damag_overlay = get_airlock_overlay("sparks_open", overlays_file)
if(note)
note_overlay = get_airlock_overlay("[notetype]_open", note_overlay_file)
if(AIRLOCK_OPENING)
frame_overlay = get_airlock_overlay("opening", icon)
@@ -475,6 +495,8 @@
panel_overlay = get_airlock_overlay("panel_opening_protected", overlays_file)
else
panel_overlay = get_airlock_overlay("panel_opening", overlays_file)
if(note)
note_overlay = get_airlock_overlay("[notetype]_opening", note_overlay_file)
cut_overlays()
add_overlay(frame_overlay)
@@ -484,6 +506,7 @@
add_overlay(weld_overlay)
add_overlay(sparks_overlay)
add_overlay(damag_overlay)
add_overlay(note_overlay)
/proc/get_airlock_overlay(icon_state, icon_file)
var/obj/machinery/door/airlock/A
@@ -512,6 +535,12 @@
to_chat(user, "<span class='warning'>The maintenance panel seems haphazardly fastened.</span>")
if(charge && panel_open)
to_chat(user, "<span class='warning'>Something is wired up to the airlock's electronics!</span>")
if(note)
if(!in_range(user, src))
to_chat(user, "There's a [note.name] pinned to the front. You can't read it from here.")
else
to_chat(user, "There's a [note.name] pinned to the front...")
note.examine(user)
if(panel_open)
switch(security_level)
@@ -1094,6 +1123,12 @@
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the airlock.</span>")
playsound(src.loc, C.usesound, 50, 1)
src.update_icon()
else if(istype(C, /obj/item/weapon/wirecutters) && note)
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
note.forceMove(get_turf(user))
note = null
update_icon()
else if(is_wire_tool(C))
return attack_hand(user)
else if(istype(C, /obj/item/weapon/pai_cable))
@@ -1119,6 +1154,16 @@
update_icon()
C.forceMove(src)
charge = C
else if(istype(C, /obj/item/weapon/paper) || istype(C, /obj/item/weapon/photo))
if(note)
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters to remove it.<spa>")
return
if(!user.transferItemToLoc(C, src))
to_chat(user, "<span class='warning'>For some reason, you can't attach [C]!</span>")
return
user.visible_message("<span class='notice'>[user] pins [C] to [src].</span>", "<span class='notice'>You pin [C] to [src].</span>")
note = C
update_icon()
else
return ..()
@@ -1550,6 +1595,14 @@
return TRUE
return FALSE
/obj/machinery/door/airlock/proc/note_type() //Returns a string representing the type of note pinned to this airlock
if(!note)
return
else if(istype(note, /obj/item/weapon/paper))
return "note"
else if(istype(note, /obj/item/weapon/photo))
return "photo"
#undef AIRLOCK_CLOSED
#undef AIRLOCK_CLOSING
#undef AIRLOCK_OPEN
@@ -252,6 +252,7 @@
name = "external airlock"
icon = 'icons/obj/doors/airlocks/external/external.dmi'
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_ext
explosion_block = 1
@@ -271,6 +272,7 @@
/obj/machinery/door/airlock/centcom
icon = 'icons/obj/doors/airlocks/centcom/centcom.dmi'
overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
opacity = 1
assemblytype = /obj/structure/door_assembly/door_assembly_centcom
normal_integrity = 1000
@@ -286,6 +288,7 @@
name = "vault door"
icon = 'icons/obj/doors/airlocks/vault/vault.dmi'
overlays_file = 'icons/obj/doors/airlocks/vault/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/vault/overlays.dmi'
opacity = 1
assemblytype = /obj/structure/door_assembly/door_assembly_vault
explosion_block = 2
@@ -301,6 +304,7 @@
name = "airtight hatch"
icon = 'icons/obj/doors/airlocks/hatch/centcom.dmi'
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
opacity = 1
assemblytype = /obj/structure/door_assembly/door_assembly_hatch
@@ -308,6 +312,7 @@
name = "maintenance hatch"
icon = 'icons/obj/doors/airlocks/hatch/maintenance.dmi'
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
opacity = 1
assemblytype = /obj/structure/door_assembly/door_assembly_mhatch
@@ -342,6 +347,7 @@
desc = "With humanity's current technological level, it could take years to hack this advanced airlock... or maybe we should give a screwdriver a try?"
icon = 'icons/obj/doors/airlocks/abductor/abductor_airlock.dmi'
overlays_file = 'icons/obj/doors/airlocks/abductor/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/abductor/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_abductor
damage_deflection = 30
opacity = 1
@@ -549,6 +555,7 @@
name = "large glass airlock"
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
note_overlay_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
opacity = 0
assemblytype = null
glass = 1
+10 -2
View File
@@ -12,7 +12,7 @@
max_integrity = 350
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags = PREVENT_CLICK_UNDER
flags = PREVENT_CLICK_UNDER
var/secondsElectrified = 0
var/shockedby = list()
@@ -32,6 +32,7 @@
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block
/obj/machinery/door/New()
..()
@@ -45,6 +46,10 @@
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(2, 1, src)
//doors only block while dense though so we have to use the proc
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
/obj/machinery/door/Destroy()
@@ -284,7 +289,7 @@
/obj/machinery/door/proc/crush()
for(var/mob/living/L in get_turf(src))
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
if(isalien(L)) //For xenos
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
L.emote("roar")
@@ -346,3 +351,6 @@
//if it blows up a wall it should blow up a door
..(severity ? max(1, severity - 1) : 0, target)
/obj/machinery/door/GetExplosionBlock()
return density ? real_explosion_block : 0
+1 -1
View File
@@ -250,7 +250,7 @@ GLOBAL_LIST_INIT(pipeID2State, list(
if(istype(user, /mob/living/carbon))
var/mob/living/carbon/C = user
for(var/i=1 to 20)
C.vomit(0,1,0,4,0)
C.vomit(0, TRUE, FALSE, 4, FALSE)
if(prob(20))
C.spew_organ()
sleep(5)
+1 -1
View File
@@ -53,7 +53,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["make"])
if(!wait)
if(wait < world.time)
var/p_type = text2path(href_list["make"])
var/p_dir = text2num(href_list["dir"])
var/obj/item/pipe/P = new (src.loc, pipe_type=p_type, dir=p_dir)
@@ -87,9 +87,9 @@
if(has_cover)
cover = new /obj/machinery/porta_turret_cover(loc)
cover.parent_turret = src
var/mutable_appearance/base = mutable_appearance('icons/obj/turrets.dmi', "basedark")
base.layer = NOT_HIGH_OBJ_LAYER
underlays += base
var/mutable_appearance/base = mutable_appearance('icons/obj/turrets.dmi', "basedark")
base.layer = NOT_HIGH_OBJ_LAYER
underlays += base
if(!has_cover)
INVOKE_ASYNC(src, .proc/popUp)
@@ -554,7 +554,7 @@
use_power = 0
has_cover = 0
scan_range = 9
req_access = list(GLOB.access_syndicate)
req_access = list(GLOB.access_syndicate)
stun_projectile = /obj/item/projectile/bullet
lethal_projectile = /obj/item/projectile/bullet
lethal_projectile_sound = 'sound/weapons/Gunshot.ogg'
@@ -564,6 +564,15 @@
faction = "syndicate"
emp_vunerable = 0
/obj/machinery/porta_turret/syndicate/energy
icon_state = "standard_stun"
base_icon_state = "standard"
stun_projectile = /obj/item/projectile/energy/electrode
stun_projectile_sound = 'sound/weapons/Taser.ogg'
lethal_projectile = /obj/item/projectile/beam/laser/heavylaser
lethal_projectile_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/machinery/porta_turret/syndicate/setup()
return
@@ -571,8 +580,8 @@
return 10 //Syndicate turrets shoot everything not in their faction
/obj/machinery/porta_turret/syndicate/pod
max_integrity = 40
integrity_failure = 20
max_integrity = 40
integrity_failure = 20
obj_integrity = 40
stun_projectile = /obj/item/projectile/bullet/weakbullet3
lethal_projectile = /obj/item/projectile/bullet/weakbullet3
@@ -925,181 +934,3 @@
on = 0
spawn(100)
on = 1
/////// MANNED TURRET ////////
/obj/machinery/manned_turret
name = "machine gun turret"
desc = "While the trigger is held down, this gun will redistribute recoil to allow its user to easily shift targets."
icon = 'icons/obj/turrets.dmi'
icon_state = "machinegun"
can_buckle = TRUE
density = TRUE
max_integrity = 100
obj_integrity = 100
buckle_lying = 0
layer = ABOVE_MOB_LAYER
var/view_range = 10
var/cooldown = 0
var/projectile_type = /obj/item/projectile/bullet/weakbullet3
var/rate_of_fire = 1
var/number_of_shots = 40
var/cooldown_duration = 90
var/atom/target
var/turf/target_turf
var/warned = FALSE
var/mouseparams
//BUCKLE HOOKS
/obj/machinery/manned_turret/unbuckle_mob(mob/living/buckled_mob,force = 0)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
for(var/obj/item/I in buckled_mob.held_items)
if(istype(I, /obj/item/gun_control))
qdel(I)
if(istype(buckled_mob))
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
anchored = FALSE
. = ..()
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
if(user.incapacitated() || !istype(user))
return
M.forceMove(get_turf(src))
..()
for(var/V in M.held_items)
var/obj/item/I = V
if(istype(I))
if(M.dropItemToGround(I))
var/obj/item/gun_control/TC = new /obj/item/gun_control(src)
M.put_in_hands(TC)
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
var/obj/item/gun_control/TC = new /obj/item/gun_control(src)
M.put_in_hands(TC)
M.pixel_y = 14
layer = ABOVE_MOB_LAYER
setDir(SOUTH)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
anchored = TRUE
if(user.client)
user.client.change_view(view_range)
/obj/item/gun_control
name = "turret controls"
icon = 'icons/obj/weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | NODROP | NOBLUDGEON
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/obj/machinery/manned_turret/turret
/obj/item/gun_control/New(obj/machinery/manned_turret/MT)
if(MT)
turret = MT
else
qdel(src)
/obj/item/gun_control/CanItemAutoclick()
return 1
/obj/item/gun_control/attack_obj(obj/O, mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
O.attacked_by(src, user)
/obj/item/gun_control/attack(mob/living/M, mob/living/user)
user.lastattacked = M
M.lastattacker = user
M.attacked_by(src, user)
add_fingerprint(user)
/obj/item/gun_control/afterattack(atom/targeted_atom, mob/user, flag, params)
..()
var/obj/machinery/manned_turret/E = user.buckled
E.setDir(get_dir(E,targeted_atom))
user.setDir(E.dir)
E.mouseparams = params
switch(E.dir)
if(NORTH)
E.layer = BELOW_MOB_LAYER
user.pixel_x = 0
user.pixel_y = -14
if(NORTHEAST)
E.layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = -4
if(EAST)
E.layer = ABOVE_MOB_LAYER
user.pixel_x = -14
user.pixel_y = 0
if(SOUTHEAST)
E.layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = 4
if(SOUTH)
E.layer = ABOVE_MOB_LAYER
user.pixel_x = 0
user.pixel_y = 14
if(SOUTHWEST)
E.layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = 4
if(WEST)
E.layer = ABOVE_MOB_LAYER
user.pixel_x = 14
user.pixel_y = 0
if(NORTHWEST)
E.layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = -4
E.checkfire(targeted_atom, user)
/obj/machinery/manned_turret/proc/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || target == get_turf(src))
return
if(world.time < cooldown)
if(!warned && world.time > (cooldown - cooldown_duration + rate_of_fire*number_of_shots)) // To capture the window where one is done firing
warned = TRUE
playsound(src, 'sound/weapons/sear.ogg', 100, 1)
return
else
cooldown = world.time + cooldown_duration
warned = FALSE
volley(user)
/obj/machinery/manned_turret/proc/volley(mob/user)
target_turf = get_turf(target)
for(var/i in 1 to number_of_shots)
addtimer(CALLBACK(src, /obj/machinery/manned_turret/.proc/fire_helper, user), i*rate_of_fire)
/obj/machinery/manned_turret/proc/fire_helper(mob/user)
if(!src)
return
var/turf/targets_from = get_turf(src)
if(QDELETED(target))
target = target_turf
var/obj/item/projectile/P = new projectile_type(targets_from)
P.current = targets_from
P.starting = targets_from
P.firer = user
P.original = target
playsound(src, 'sound/weapons/Gunshot_smg.ogg', 75, 1)
P.preparePixelProjectile(target, target_turf, user, mouseparams, rand(-9, 9))
P.fire()
/obj/machinery/manned_turret/ultimate // Admin-only proof of concept for autoclicker automatics
name = "Infinity Gun"
view_range = 12
projectile_type = /obj/item/projectile/bullet/weakbullet3
/obj/machinery/manned_turret/ultimate/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || target == get_turf(src))
return
target_turf = get_turf(target)
fire_helper(user)
+20 -36
View File
@@ -61,7 +61,7 @@
G.loc = src
charging = G
use_power = 2
update_icon(scan = TRUE)
update_icon(scan = TRUE)
else
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
return 1
@@ -108,41 +108,25 @@
var/using_power = 0
if(charging)
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
E.power_supply.give(E.power_supply.chargerate * recharge_coeff)
E.recharge_newshot()
var/obj/item/weapon/stock_parts/cell/C = charging.get_cell()
if(C)
if(C.charge < C.maxcharge)
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
using_power = 1
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell)
if(B.bcell.give(B.bcell.chargerate * recharge_coeff))
use_power(200 * recharge_coeff)
using_power = 1
update_icon(using_power)
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
E.recharge_newshot()
return
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging
if(R.stored_ammo.len < R.max_ammo)
R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff)
using_power = 1
if(istype(charging, /obj/item/device/modular_computer))
var/obj/item/device/modular_computer/C = charging
var/obj/item/weapon/computer_hardware/battery/battery_module = C.all_components[MC_CELL]
if(battery_module)
var/obj/item/weapon/computer_hardware/battery/B = battery_module
if(B.battery)
if(B.battery.charge < B.battery.maxcharge)
B.battery.give(B.battery.chargerate * recharge_coeff)
use_power(200 * recharge_coeff)
using_power = 1
update_icon(using_power)
update_icon(using_power)
return
/obj/machinery/recharger/power_change()
..()
@@ -152,23 +136,23 @@
if(!(stat & (NOPOWER|BROKEN)) && anchored)
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply)
E.power_supply.emp_act(severity)
if(E.cell)
E.cell.emp_act(severity)
else if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell)
B.bcell.charge = 0
if(B.cell)
B.cell.charge = 0
..()
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff"
return
if(scan)
icon_state = "rechargeroff"
return
if(scan)
icon_state = "rechargeroff"
return
if(panel_open)
icon_state = "rechargeropen"
return
+3
View File
@@ -24,6 +24,9 @@
var/settableTemperatureMedian = 30 + T0C
var/settableTemperatureRange = 30
/obj/machinery/space_heater/get_cell()
return cell
/obj/machinery/space_heater/New()
..()
cell = new(src)
+8
View File
@@ -213,6 +213,14 @@
var/emotion = "Neutral"
/obj/machinery/ai_status_display/Initialize()
. = ..()
GLOB.ai_status_displays.Add(src)
/obj/machinery/ai_status_display/Destroy()
GLOB.ai_status_displays.Remove(src)
. = ..()
/obj/machinery/ai_status_display/attack_ai(mob/living/silicon/ai/user)
if(isAI(user))
user.ai_statuschange()
+4 -18
View File
@@ -17,10 +17,12 @@
var/obj/effect/countdown/transformer/countdown
var/mob/living/silicon/ai/masterAI
/obj/machinery/transformer/New()
/obj/machinery/transformer/Initialize()
// On us
..()
. = ..()
new /obj/machinery/conveyor/auto(locate(x - 1, y, z), WEST)
new /obj/machinery/conveyor/auto(loc, WEST)
new /obj/machinery/conveyor/auto(locate(x + 1, y, z), WEST)
countdown = new(src)
countdown.start()
@@ -116,19 +118,3 @@
if(R)
R.SetLockdown(0)
R.notify_ai(NEW_BORG)
/obj/machinery/transformer/conveyor/New()
..()
var/turf/T = loc
if(T)
// Spawn Conveyor Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(isfloorturf(east))
new /obj/machinery/conveyor/auto(east, WEST)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(isfloorturf(west))
new /obj/machinery/conveyor/auto(west, WEST)
+3 -3
View File
@@ -960,7 +960,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/seeds/cabbage = 3,/obj/item/seeds/carrot = 3,/obj/item/seeds/cherry = 3,/obj/item/seeds/chanter = 3,
/obj/item/seeds/chili = 3,/obj/item/seeds/cocoapod = 3,/obj/item/seeds/coffee = 3,/obj/item/seeds/corn = 3,
/obj/item/seeds/eggplant = 3,/obj/item/seeds/grape = 3,/obj/item/seeds/grass = 3,/obj/item/seeds/lemon = 3,
/obj/item/seeds/lime = 3,/obj/item/seeds/orange = 3,/obj/item/seeds/potato = 3,/obj/item/seeds/poppy = 3,
/obj/item/seeds/lime = 3,/obj/item/seeds/onion = 3,/obj/item/seeds/orange = 3,/obj/item/seeds/potato = 3,/obj/item/seeds/poppy = 3,
/obj/item/seeds/pumpkin = 3,/obj/item/seeds/replicapod = 3,/obj/item/seeds/wheat/rice = 3,/obj/item/seeds/soya = 3,/obj/item/seeds/sunflower = 3,
/obj/item/seeds/tea = 3,/obj/item/seeds/tobacco = 3,/obj/item/seeds/tomato = 3,
/obj/item/seeds/tower = 3,/obj/item/seeds/watermelon = 3,/obj/item/seeds/wheat = 3,/obj/item/seeds/whitebeet = 3)
@@ -995,7 +995,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/head/helmet/gladiator = 1,/obj/item/clothing/under/gimmick/rank/captain/suit = 1,/obj/item/clothing/head/flatcap = 1,
/obj/item/clothing/suit/toggle/labcoat/mad = 1,/obj/item/clothing/shoes/jackboots = 1,
/obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/under/schoolgirl/red = 1,/obj/item/clothing/under/schoolgirl/green = 1,/obj/item/clothing/under/schoolgirl/orange = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/skirt/black = 1,/obj/item/clothing/head/beret = 1,
/obj/item/clothing/tie/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/tie/waistcoat = 1,
/obj/item/clothing/accessory/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/accessory/waistcoat = 1,
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowler = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
/obj/item/clothing/mask/fakemoustache = 1,/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1,/obj/item/clothing/head/plaguedoctorhat = 1,/obj/item/clothing/mask/gas/plaguedoctor = 1,
/obj/item/clothing/suit/toggle/owlwings = 1, /obj/item/clothing/under/owl = 1,/obj/item/clothing/mask/gas/owl_mask = 1,
@@ -1136,7 +1136,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/neck/scarf/purple=1,/obj/item/clothing/neck/scarf/yellow=1,/obj/item/clothing/neck/scarf/orange=1,
/obj/item/clothing/neck/scarf/cyan=1,/obj/item/clothing/neck/scarf=1,/obj/item/clothing/neck/scarf/black=1,
/obj/item/clothing/neck/scarf/zebra=1,/obj/item/clothing/neck/scarf/christmas=1,/obj/item/clothing/neck/stripedredscarf=1,
/obj/item/clothing/neck/stripedbluescarf=1,/obj/item/clothing/neck/stripedgreenscarf=1,/obj/item/clothing/tie/waistcoat=1,
/obj/item/clothing/neck/stripedbluescarf=1,/obj/item/clothing/neck/stripedgreenscarf=1,/obj/item/clothing/accessory/waistcoat=1,
/obj/item/clothing/under/skirt/black=1,/obj/item/clothing/under/skirt/blue=1,/obj/item/clothing/under/skirt/red=1,/obj/item/clothing/under/skirt/purple=1,
/obj/item/clothing/under/sundress=2,/obj/item/clothing/under/stripeddress=1, /obj/item/clothing/under/sailordress=1, /obj/item/clothing/under/redeveninggown=1, /obj/item/clothing/under/blacktango=1,
/obj/item/clothing/under/plaid_skirt=1,/obj/item/clothing/under/plaid_skirt/blue=1,/obj/item/clothing/under/plaid_skirt/purple=1,/obj/item/clothing/under/plaid_skirt/green=1,
+4 -1
View File
@@ -142,6 +142,9 @@
diag_hud_set_mechstat()
diag_hud_set_mechtracking()
/obj/mecha/get_cell()
return cell
/obj/mecha/Destroy()
go_out()
@@ -154,7 +157,7 @@
M.forceMove(loc)
if(prob(30))
explosion(get_turf(loc), 0, 0, 1, 3)
explosion(get_turf(loc), 0, 0, 1, 3)
if(wreckage)
var/obj/structure/mecha_wreckage/WR = new wreckage(loc, AI)
+8 -10
View File
@@ -43,19 +43,19 @@
buckled_mobs = list()
if(!istype(M))
return 0
return FALSE
if(check_loc && M.loc != loc)
return 0
return FALSE
if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
return 0
return FALSE
if(!M.can_buckle() && !force)
if(M == usr)
to_chat(M, "<span class='warning'>You are unable to buckle yourself to the [src]!</span>")
else
to_chat(usr, "<span class='warning'>You are unable to buckle [M] to the [src]!</span>")
return 0
return FALSE
if(M.pulledby && buckle_prevents_pull)
M.pulledby.stop_pulling()
@@ -70,7 +70,7 @@
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
post_buckle_mob(M)
return 1
return TRUE
/obj/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
. = ..()
@@ -105,11 +105,11 @@
//Wrapper procs that handle sanity and user feedback
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if(!in_range(user, src) || user.stat || user.restrained())
return 0
return FALSE
add_fingerprint(user)
if(buckle_mob(M, check_loc = check_loc))
. = buckle_mob(M, check_loc = check_loc)
if(.)
if(M == user)
M.visible_message(\
"<span class='notice'>[M] buckles [M.p_them()]self to [src].</span>",\
@@ -120,8 +120,6 @@
"<span class='warning'>[user] buckles [M] to [src]!</span>",\
"<span class='warning'>[user] buckles you to [src]!</span>",\
"<span class='italics'>You hear metal clanking.</span>")
return 1
/atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
var/mob/living/M = unbuckle_mob(buckled_mob)
+14 -6
View File
@@ -30,27 +30,35 @@
layer = HIGH_OBJ_LAYER //Harder to hide
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
var/datum/gang/gang
var/obj/item/device/gangtool/linked_tool
var/datum/mind/user_mind
var/area/territory
/obj/effect/decal/cleanable/crayon/gang/Initialize(mapload, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0, var/mob/user)
if(!type || !G)
qdel(src)
user_mind = user.mind
territory = get_area(src)
gang = G
var/newcolor = G.color_hex
icon_state = G.name
G.territory_new |= list(territory.type = territory.name)
linked_tool = locate(/obj/item/device/gangtool) in user.contents
if(linked_tool)
linked_tool.tags += src
//If this isn't tagged by a specific gangster there's no bonus income.
set_mind_owner(user_mind)
..(mapload, newcolor, icon_state, e_name, rotation)
/obj/effect/decal/cleanable/crayon/gang/proc/set_mind_owner(datum/mind/mind)
if(istype(user_mind) && istype(gang) && islist(gang.tags_by_mind[user_mind])) //Clear us out of old ownership
gang.tags_by_mind[user_mind] -= src
if(istype(mind))
if(!islist(gang.tags_by_mind[mind]))
gang.tags_by_mind[mind] = list()
gang.tags_by_mind[mind] += src
user_mind = mind
/obj/effect/decal/cleanable/crayon/gang/Destroy()
if(linked_tool)
linked_tool.tags -= src
if(gang)
gang.territory -= territory.type
set_mind_owner(null)
gang.territory_new -= territory.type
gang.territory_lost |= list(territory.type = territory.name)
return ..()
+4 -1
View File
@@ -64,4 +64,7 @@
icon_state = "sandyfloor"
/obj/effect/turf_decal/sand/plating
icon_state = "sandyplating"
icon_state = "sandyplating"
/obj/effect/turf_decal/plaque
icon_state = "plaque"

Some files were not shown because too many files have changed in this diff Show More