mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
This commit is contained in:
co-authored by
Aleksej Komarov
parent
39e8bd721f
commit
62676e72a8
@@ -1,111 +1,111 @@
|
||||
/*
|
||||
The holodeck activates these shortly after the program loads,
|
||||
and deactivates them immediately before changing or disabling the holodeck.
|
||||
|
||||
These remove snowflake code for special holodeck functions.
|
||||
*/
|
||||
/obj/effect/holodeck_effect
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/effect/holodeck_effect/proc/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
return
|
||||
|
||||
/obj/effect/holodeck_effect/proc/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Called by the holodeck computer as long as the program is running
|
||||
/obj/effect/holodeck_effect/proc/tick(var/obj/machinery/computer/holodeck/HC)
|
||||
return
|
||||
|
||||
/obj/effect/holodeck_effect/proc/safety(var/active)
|
||||
return
|
||||
|
||||
|
||||
// Generates a holodeck-tracked card deck
|
||||
/obj/effect/holodeck_effect/cards
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "deck_nanotrasen_full"
|
||||
var/obj/item/toy/cards/deck/D
|
||||
|
||||
/obj/effect/holodeck_effect/cards/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
D = new(loc)
|
||||
safety(!(HC.obj_flags & EMAGGED))
|
||||
D.holo = HC
|
||||
return D
|
||||
|
||||
/obj/effect/holodeck_effect/cards/safety(active)
|
||||
if(!D)
|
||||
return
|
||||
if(active)
|
||||
D.card_hitsound = null
|
||||
D.card_force = 0
|
||||
D.card_throwforce = 0
|
||||
D.card_throw_speed = 3
|
||||
D.card_throw_range = 7
|
||||
D.card_attack_verb = list("attacked")
|
||||
else
|
||||
D.card_hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
D.card_force = 5
|
||||
D.card_throwforce = 10
|
||||
D.card_throw_speed = 3
|
||||
D.card_throw_range = 7
|
||||
D.card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut")
|
||||
|
||||
|
||||
/obj/effect/holodeck_effect/sparks/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(3, 1, T)
|
||||
s.start()
|
||||
T.temperature = 5000
|
||||
T.hotspot_expose(50000,50000,1)
|
||||
|
||||
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner
|
||||
var/mobtype = /mob/living/simple_animal/hostile/carp/holocarp
|
||||
var/mob/mob = null
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
if(islist(mobtype))
|
||||
mobtype = pick(mobtype)
|
||||
mob = new mobtype(loc)
|
||||
mob.flags_1 |= HOLOGRAM_1
|
||||
|
||||
// these vars are not really standardized but all would theoretically create stuff on death
|
||||
for(var/v in list("butcher_results","corpse","weapon1","weapon2","blood_volume") & mob.vars)
|
||||
mob.vars[v] = null
|
||||
return mob
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
if(mob)
|
||||
HC.derez(mob)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/pet
|
||||
mobtype = list(
|
||||
/mob/living/simple_animal/butterfly, /mob/living/simple_animal/chick/holo,
|
||||
/mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/cat/kitten,
|
||||
/mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/dog/corgi/puppy,
|
||||
/mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/pet/fox)
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/bee
|
||||
mobtype = /mob/living/simple_animal/hostile/poison/bees/toxin
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/monkey
|
||||
mobtype = /mob/living/simple_animal/holodeck_monkey
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/emperor
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin/Initialize()
|
||||
if(prob(1))
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/emperor/shamebrero
|
||||
return ..()
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin_baby
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/baby
|
||||
/*
|
||||
The holodeck activates these shortly after the program loads,
|
||||
and deactivates them immediately before changing or disabling the holodeck.
|
||||
|
||||
These remove snowflake code for special holodeck functions.
|
||||
*/
|
||||
/obj/effect/holodeck_effect
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/effect/holodeck_effect/proc/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
return
|
||||
|
||||
/obj/effect/holodeck_effect/proc/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Called by the holodeck computer as long as the program is running
|
||||
/obj/effect/holodeck_effect/proc/tick(var/obj/machinery/computer/holodeck/HC)
|
||||
return
|
||||
|
||||
/obj/effect/holodeck_effect/proc/safety(var/active)
|
||||
return
|
||||
|
||||
|
||||
// Generates a holodeck-tracked card deck
|
||||
/obj/effect/holodeck_effect/cards
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "deck_nanotrasen_full"
|
||||
var/obj/item/toy/cards/deck/D
|
||||
|
||||
/obj/effect/holodeck_effect/cards/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
D = new(loc)
|
||||
safety(!(HC.obj_flags & EMAGGED))
|
||||
D.holo = HC
|
||||
return D
|
||||
|
||||
/obj/effect/holodeck_effect/cards/safety(active)
|
||||
if(!D)
|
||||
return
|
||||
if(active)
|
||||
D.card_hitsound = null
|
||||
D.card_force = 0
|
||||
D.card_throwforce = 0
|
||||
D.card_throw_speed = 3
|
||||
D.card_throw_range = 7
|
||||
D.card_attack_verb = list("attacked")
|
||||
else
|
||||
D.card_hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
D.card_force = 5
|
||||
D.card_throwforce = 10
|
||||
D.card_throw_speed = 3
|
||||
D.card_throw_range = 7
|
||||
D.card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut")
|
||||
|
||||
|
||||
/obj/effect/holodeck_effect/sparks/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(3, 1, T)
|
||||
s.start()
|
||||
T.temperature = 5000
|
||||
T.hotspot_expose(50000,50000,1)
|
||||
|
||||
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner
|
||||
var/mobtype = /mob/living/simple_animal/hostile/carp/holocarp
|
||||
var/mob/mob = null
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/activate(var/obj/machinery/computer/holodeck/HC)
|
||||
if(islist(mobtype))
|
||||
mobtype = pick(mobtype)
|
||||
mob = new mobtype(loc)
|
||||
mob.flags_1 |= HOLOGRAM_1
|
||||
|
||||
// these vars are not really standardized but all would theoretically create stuff on death
|
||||
for(var/v in list("butcher_results","corpse","weapon1","weapon2","blood_volume") & mob.vars)
|
||||
mob.vars[v] = null
|
||||
return mob
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
if(mob)
|
||||
HC.derez(mob)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/pet
|
||||
mobtype = list(
|
||||
/mob/living/simple_animal/butterfly, /mob/living/simple_animal/chick/holo,
|
||||
/mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/cat/kitten,
|
||||
/mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/dog/corgi/puppy,
|
||||
/mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/pet/fox)
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/bee
|
||||
mobtype = /mob/living/simple_animal/hostile/poison/bees/toxin
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/monkey
|
||||
mobtype = /mob/living/simple_animal/holodeck_monkey
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/emperor
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin/Initialize()
|
||||
if(prob(1))
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/emperor/shamebrero
|
||||
return ..()
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/penguin_baby
|
||||
mobtype = /mob/living/simple_animal/pet/penguin/baby
|
||||
|
||||
+229
-229
@@ -1,229 +1,229 @@
|
||||
/*
|
||||
Items, Structures, Machines
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// Items
|
||||
//
|
||||
|
||||
/obj/item/holo
|
||||
damtype = STAMINA
|
||||
|
||||
/obj/item/holo/esword
|
||||
name = "holographic energy sword"
|
||||
desc = "May the force be with you. Sorta."
|
||||
icon = 'icons/obj/transforming_energy.dmi'
|
||||
icon_state = "sword0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
force = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
hitsound = "swing_hit"
|
||||
armour_penetration = 50
|
||||
var/active = 0
|
||||
var/saber_color
|
||||
|
||||
/obj/item/holo/esword/green/Initialize()
|
||||
. = ..()
|
||||
saber_color = "green"
|
||||
|
||||
/obj/item/holo/esword/red/Initialize()
|
||||
. = ..()
|
||||
saber_color = "red"
|
||||
|
||||
/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/holo/esword/attack(target as mob, mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/holo/esword/Initialize()
|
||||
. = ..()
|
||||
saber_color = pick("red","blue","green","purple")
|
||||
|
||||
/obj/item/holo/esword/attack_self(mob/living/user as mob)
|
||||
active = !active
|
||||
if (active)
|
||||
force = 30
|
||||
icon_state = "sword[saber_color]"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 20, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
icon_state = "sword0"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
hitsound = "swing_hit"
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 20, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
return
|
||||
|
||||
//BASKETBALL OBJECTS
|
||||
|
||||
/obj/item/toy/beach_ball/holoball
|
||||
name = "basketball"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "basketball"
|
||||
inhand_icon_state = "basketball"
|
||||
desc = "Here's your chance, do your dance at the Space Jam."
|
||||
w_class = WEIGHT_CLASS_BULKY //Stops people from hiding it in their bags/pockets
|
||||
|
||||
/obj/item/toy/beach_ball/holoball/dodgeball
|
||||
name = "dodgeball"
|
||||
icon_state = "dodgeball"
|
||||
inhand_icon_state = "dodgeball"
|
||||
desc = "Used for playing the most violent and degrading of childhood games."
|
||||
|
||||
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
if((ishuman(hit_atom)))
|
||||
var/mob/living/carbon/M = hit_atom
|
||||
playsound(src, 'sound/items/dodgeball.ogg', 50, TRUE)
|
||||
M.apply_damage(10, STAMINA)
|
||||
if(prob(5))
|
||||
M.Paralyze(60)
|
||||
visible_message("<span class='danger'>[M] is knocked right off [M.p_their()] feet!</span>")
|
||||
|
||||
//
|
||||
// Structures
|
||||
//
|
||||
|
||||
/obj/structure/holohoop
|
||||
name = "basketball hoop"
|
||||
desc = "Boom, shakalaka!"
|
||||
icon = 'icons/obj/basketball.dmi'
|
||||
icon_state = "hoop"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/holohoop/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(get_dist(src,user)<2)
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
visible_message("<span class='warning'>[user] dunks [W] into \the [src]!</span>")
|
||||
|
||||
/obj/structure/holohoop/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
L.forceMove(loc)
|
||||
L.Paralyze(100)
|
||||
visible_message("<span class='danger'>[user] dunks [L] into \the [src]!</span>")
|
||||
user.stop_pulling()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if (isitem(AM) && !istype(AM,/obj/projectile))
|
||||
if(prob(50))
|
||||
AM.forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'>Swish! [AM] lands in [src].</span>")
|
||||
return
|
||||
else
|
||||
visible_message("<span class='danger'>[AM] bounces off of [src]'s rim!</span>")
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Machines
|
||||
//
|
||||
|
||||
/obj/machinery/readybutton
|
||||
name = "ready declaration device"
|
||||
desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "auth_off"
|
||||
var/ready = 0
|
||||
var/area/currentarea = null
|
||||
var/eventstarted = FALSE
|
||||
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
power_channel = AREA_USAGE_ENVIRON
|
||||
|
||||
/obj/machinery/readybutton/attack_ai(mob/user as mob)
|
||||
to_chat(user, "<span class='warning'>The station AI is not to interact with these devices!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/attack_paw(mob/user as mob)
|
||||
to_chat(user, "<span class='warning'>You are too primitive to use this device!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
to_chat(user, "<span class='warning'>The device is a solid button, there's nothing you can do with it!</span>")
|
||||
|
||||
/obj/machinery/readybutton/attack_hand(mob/user as mob)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.stat || machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>This device is not powered!</span>")
|
||||
return
|
||||
|
||||
currentarea = get_area(src.loc)
|
||||
if(!currentarea)
|
||||
qdel(src)
|
||||
|
||||
if(eventstarted)
|
||||
to_chat(usr, "<span class='warning'>The event has already begun!</span>")
|
||||
return
|
||||
|
||||
ready = !ready
|
||||
|
||||
update_icon()
|
||||
|
||||
var/numbuttons = 0
|
||||
var/numready = 0
|
||||
for(var/obj/machinery/readybutton/button in currentarea)
|
||||
numbuttons++
|
||||
if (button.ready)
|
||||
numready++
|
||||
|
||||
if(numbuttons == numready)
|
||||
begin_event()
|
||||
|
||||
/obj/machinery/readybutton/update_icon_state()
|
||||
if(ready)
|
||||
icon_state = "auth_on"
|
||||
else
|
||||
icon_state = "auth_off"
|
||||
|
||||
/obj/machinery/readybutton/proc/begin_event()
|
||||
|
||||
eventstarted = TRUE
|
||||
|
||||
for(var/obj/structure/window/W in currentarea)
|
||||
if(W.flags_1&NODECONSTRUCT_1) // Just in case: only holo-windows
|
||||
qdel(W)
|
||||
|
||||
for(var/mob/M in currentarea)
|
||||
to_chat(M, "<span class='userdanger'>FIGHT!</span>")
|
||||
|
||||
/obj/machinery/conveyor/holodeck
|
||||
|
||||
/obj/machinery/conveyor/holodeck/attackby(obj/item/I, mob/user, params)
|
||||
if(!user.transferItemToLoc(I, drop_location()))
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/fluff/holodeck/trek_diploma
|
||||
name = "paper - Starfleet Academy Diploma"
|
||||
info = {"<h2>Starfleet Academy</h2></br><p>Official Diploma</p></br>"}
|
||||
|
||||
/obj/item/paper/fluff/holodeck/disclaimer
|
||||
name = "Holodeck Disclaimer"
|
||||
info = "Bruises sustained in the holodeck can be healed simply by sleeping."
|
||||
/*
|
||||
Items, Structures, Machines
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// Items
|
||||
//
|
||||
|
||||
/obj/item/holo
|
||||
damtype = STAMINA
|
||||
|
||||
/obj/item/holo/esword
|
||||
name = "holographic energy sword"
|
||||
desc = "May the force be with you. Sorta."
|
||||
icon = 'icons/obj/transforming_energy.dmi'
|
||||
icon_state = "sword0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
force = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
hitsound = "swing_hit"
|
||||
armour_penetration = 50
|
||||
var/active = 0
|
||||
var/saber_color
|
||||
|
||||
/obj/item/holo/esword/green/Initialize()
|
||||
. = ..()
|
||||
saber_color = "green"
|
||||
|
||||
/obj/item/holo/esword/red/Initialize()
|
||||
. = ..()
|
||||
saber_color = "red"
|
||||
|
||||
/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/holo/esword/attack(target as mob, mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/holo/esword/Initialize()
|
||||
. = ..()
|
||||
saber_color = pick("red","blue","green","purple")
|
||||
|
||||
/obj/item/holo/esword/attack_self(mob/living/user as mob)
|
||||
active = !active
|
||||
if (active)
|
||||
force = 30
|
||||
icon_state = "sword[saber_color]"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 20, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
icon_state = "sword0"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
hitsound = "swing_hit"
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 20, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
return
|
||||
|
||||
//BASKETBALL OBJECTS
|
||||
|
||||
/obj/item/toy/beach_ball/holoball
|
||||
name = "basketball"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "basketball"
|
||||
inhand_icon_state = "basketball"
|
||||
desc = "Here's your chance, do your dance at the Space Jam."
|
||||
w_class = WEIGHT_CLASS_BULKY //Stops people from hiding it in their bags/pockets
|
||||
|
||||
/obj/item/toy/beach_ball/holoball/dodgeball
|
||||
name = "dodgeball"
|
||||
icon_state = "dodgeball"
|
||||
inhand_icon_state = "dodgeball"
|
||||
desc = "Used for playing the most violent and degrading of childhood games."
|
||||
|
||||
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
if((ishuman(hit_atom)))
|
||||
var/mob/living/carbon/M = hit_atom
|
||||
playsound(src, 'sound/items/dodgeball.ogg', 50, TRUE)
|
||||
M.apply_damage(10, STAMINA)
|
||||
if(prob(5))
|
||||
M.Paralyze(60)
|
||||
visible_message("<span class='danger'>[M] is knocked right off [M.p_their()] feet!</span>")
|
||||
|
||||
//
|
||||
// Structures
|
||||
//
|
||||
|
||||
/obj/structure/holohoop
|
||||
name = "basketball hoop"
|
||||
desc = "Boom, shakalaka!"
|
||||
icon = 'icons/obj/basketball.dmi'
|
||||
icon_state = "hoop"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/holohoop/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(get_dist(src,user)<2)
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
visible_message("<span class='warning'>[user] dunks [W] into \the [src]!</span>")
|
||||
|
||||
/obj/structure/holohoop/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
L.forceMove(loc)
|
||||
L.Paralyze(100)
|
||||
visible_message("<span class='danger'>[user] dunks [L] into \the [src]!</span>")
|
||||
user.stop_pulling()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if (isitem(AM) && !istype(AM,/obj/projectile))
|
||||
if(prob(50))
|
||||
AM.forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'>Swish! [AM] lands in [src].</span>")
|
||||
return
|
||||
else
|
||||
visible_message("<span class='danger'>[AM] bounces off of [src]'s rim!</span>")
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Machines
|
||||
//
|
||||
|
||||
/obj/machinery/readybutton
|
||||
name = "ready declaration device"
|
||||
desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "auth_off"
|
||||
var/ready = 0
|
||||
var/area/currentarea = null
|
||||
var/eventstarted = FALSE
|
||||
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
power_channel = AREA_USAGE_ENVIRON
|
||||
|
||||
/obj/machinery/readybutton/attack_ai(mob/user as mob)
|
||||
to_chat(user, "<span class='warning'>The station AI is not to interact with these devices!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/attack_paw(mob/user as mob)
|
||||
to_chat(user, "<span class='warning'>You are too primitive to use this device!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
to_chat(user, "<span class='warning'>The device is a solid button, there's nothing you can do with it!</span>")
|
||||
|
||||
/obj/machinery/readybutton/attack_hand(mob/user as mob)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.stat || machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>This device is not powered!</span>")
|
||||
return
|
||||
|
||||
currentarea = get_area(src.loc)
|
||||
if(!currentarea)
|
||||
qdel(src)
|
||||
|
||||
if(eventstarted)
|
||||
to_chat(usr, "<span class='warning'>The event has already begun!</span>")
|
||||
return
|
||||
|
||||
ready = !ready
|
||||
|
||||
update_icon()
|
||||
|
||||
var/numbuttons = 0
|
||||
var/numready = 0
|
||||
for(var/obj/machinery/readybutton/button in currentarea)
|
||||
numbuttons++
|
||||
if (button.ready)
|
||||
numready++
|
||||
|
||||
if(numbuttons == numready)
|
||||
begin_event()
|
||||
|
||||
/obj/machinery/readybutton/update_icon_state()
|
||||
if(ready)
|
||||
icon_state = "auth_on"
|
||||
else
|
||||
icon_state = "auth_off"
|
||||
|
||||
/obj/machinery/readybutton/proc/begin_event()
|
||||
|
||||
eventstarted = TRUE
|
||||
|
||||
for(var/obj/structure/window/W in currentarea)
|
||||
if(W.flags_1&NODECONSTRUCT_1) // Just in case: only holo-windows
|
||||
qdel(W)
|
||||
|
||||
for(var/mob/M in currentarea)
|
||||
to_chat(M, "<span class='userdanger'>FIGHT!</span>")
|
||||
|
||||
/obj/machinery/conveyor/holodeck
|
||||
|
||||
/obj/machinery/conveyor/holodeck/attackby(obj/item/I, mob/user, params)
|
||||
if(!user.transferItemToLoc(I, drop_location()))
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/fluff/holodeck/trek_diploma
|
||||
name = "paper - Starfleet Academy Diploma"
|
||||
info = {"<h2>Starfleet Academy</h2></br><p>Official Diploma</p></br>"}
|
||||
|
||||
/obj/item/paper/fluff/holodeck/disclaimer
|
||||
name = "Holodeck Disclaimer"
|
||||
info = "Bruises sustained in the holodeck can be healed simply by sleeping."
|
||||
|
||||
Reference in New Issue
Block a user